sorich87 / bootstrap-tour

Quick and easy product tours with Twitter Bootstrap Popovers
http://bootstraptour.com
MIT License
4.44k stars 942 forks source link

Problem with focus on mobile ... #644

Open MartinW2012 opened 7 years ago

MartinW2012 commented 7 years ago

On mobile (phone/tablet), Bootstrap Tour breaks the page if there is an input field on the page.

Specifically, if the tour is running and the user tries to set the focus to an input field on the page, then you firstly see the virtual keyboard appear (meaning focus went to the input field) but then you immediately find that the virtual keyboard has disappeared again (meaning focus has gone back to the "Next" tour button).

It is therefore impossible to enter any data into a form while the tour is running.

domahub commented 7 years ago

Is there a fix for this solution? We love Bootstrap Tour but it's seriously breaking our page on mobile...

domahub commented 7 years ago

What we're doing is to edit the Bootstrap Tour JS file to just remove the focus on Next button entirely. So far it's been working fine.

MartinW2012 commented 7 years ago

Hi domahub,

Can you share the change you made?

Martin

domahub commented 7 years ago

Sure.

Just delete line 1278 of bootstrap-tour-standalone.js

this._focus($tip, $element, step.next < 0);

Hope this helps!