HiDeoo / intro.js-react

Intro.js react wrapper
MIT License
407 stars 58 forks source link

The `position` attribute isn't working #15

Closed zoheiry closed 6 years ago

zoheiry commented 6 years ago

I have a step that looks as follows

{
  element: ".elemntClassName",
  intro: "Hello world",
  position: "top"
}

It never shows up on top, I've tried all the different placements, but nothing seems to be changing it from bottom.

HiDeoo commented 6 years ago

Hi,

I can't seem to repro this issue. I tried with a step similar to you:

{
  element: '.test1',
  intro: 'test 1',
  position: 'left',
}

It'll render properly to the left:

screen shot 2018-03-12 at 17 18 08

Please note that intro.js will make sure it has room to render the step, for example, if my test1 div is positioned on the left side of my page without any room to render the step, it'll default to another side. For example, with the same step with left position, it'll render on the right no matter what:

screen shot 2018-03-12 at 17 18 22

I don't know how intro.js actually calculate that, you may need to check their source code if you need more details regarding that part.

I'll close the issue at the moment as I can't repro but make sure to re-open if you can provide a repro.

zoheiry commented 6 years ago

@HiDeoo Could you also try bottom-right-aligned because that seems to be the one that isn't working.

zoheiry commented 6 years ago

After a bit of digging I found the issue in IntroJs, I'm attempting to fix it, and will create a PR from them. Thanks for your help 👍

webdevbry commented 2 years ago

Any fix for this? I'm having this happen in Intro 4.3.0