|
|
|
@ -79,25 +79,27 @@ if ('undefined' !== typeof window) {
|
|
|
|
|
|
|
|
|
|
})(jQuery || {fn:{}});
|
|
|
|
|
|
|
|
|
|
(function(){
|
|
|
|
|
// FIX FOR #1245 - https://github.com/NodeBB/NodeBB/issues/1245
|
|
|
|
|
// from http://stackoverflow.com/questions/15931962/bootstrap-dropdown-disappear-with-right-click-on-firefox
|
|
|
|
|
// obtain a reference to the original handler
|
|
|
|
|
var _clearMenus = $._data(document, "events").click.filter(function (el) {
|
|
|
|
|
return el.namespace === 'bs.data-api.dropdown' && el.selector === undefined;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// FIX FOR #1245 - https://github.com/NodeBB/NodeBB/issues/1245
|
|
|
|
|
// from http://stackoverflow.com/questions/15931962/bootstrap-dropdown-disappear-with-right-click-on-firefox
|
|
|
|
|
// obtain a reference to the original handler
|
|
|
|
|
var _clearMenus = $._data(document, "events").click.filter(function (el) {
|
|
|
|
|
return el.namespace === 'bs.data-api.dropdown' && el.selector === undefined;
|
|
|
|
|
});
|
|
|
|
|
if(_clearMenus.length) {
|
|
|
|
|
_clearMenus = _clearMenus[0].handler;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(_clearMenus.length) {
|
|
|
|
|
_clearMenus = _clearMenus[0].handler;
|
|
|
|
|
}
|
|
|
|
|
// disable the old listener
|
|
|
|
|
$(document)
|
|
|
|
|
.off('click.data-api.dropdown', _clearMenus)
|
|
|
|
|
.on('click.data-api.dropdown', function (e) {
|
|
|
|
|
// call the handler only when not right-click
|
|
|
|
|
if (e.button !== 2) {
|
|
|
|
|
_clearMenus();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
// disable the old listener
|
|
|
|
|
$(document)
|
|
|
|
|
.off('click.data-api.dropdown', _clearMenus)
|
|
|
|
|
.on('click.data-api.dropdown', function (e) {
|
|
|
|
|
// call the handler only when not right-click
|
|
|
|
|
if (e.button !== 2) {
|
|
|
|
|
_clearMenus();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|