3

I have a question about bootstrap popover - javascript plugin. Popover has got text input inside, and when viewing this page on normal browser, I can click on this input and enter data.

But in android, when I open popover and click input, the keyboard appears but popover disappers.

On iOS popover works as expected, but on Android it dissapears. My code is generic, and simple:

$('.logMe').popover({
            html: true,
            placement: 'bottom',
            content: function() {
                return $('#login').parent().html();
            }
        })

Thank You for any advice.

bpeterson76
  • 12,918
  • 5
  • 49
  • 82
user2610146
  • 179
  • 1
  • 11

2 Answers2

2

This is a known bug. The current workaround is a listener that will close it. Something like this:

$('*').bind('touchend', function(e){
   if ($(e.target).attr('rel') !== 'tooltip' && ($('div.tooltip.in').length > 0)){
        $('[rel=tooltip]').mouseleave();
        e.stopPropagation();
   } else {
        $(e.target).mouseenter();
   }
});
bpeterson76
  • 12,918
  • 5
  • 49
  • 82
0

This worked for me:

$(window).resize(function () {
   $(window).refreshPosition();
});
najs
  • 1