Я пытаюсь закрыть любой popover
открывается, когда any body element
(а не сам popover) is focused
,
поэтому я делаю:
$(document.body).on('focus focusout focusin', function(e) {
if( e.target.classList.contains('popover') ){return false;}
else{
$('*').popover('hide');
}
// code to close the popover
});
это отлично работает на Chrome
, но не на FF
, на FF
мне нужно focusin and focusout
до закрытия popover.
вот мой пример, работающий только для хрома: http://jsfiddle.net/CU5U5/4/
Как я могу это исправить?