Prevent closing the create dropdown when right clicking in Firefox

Firefox sends a click event on the document when right clicking which
makes pasting with right click into the field impossible.

Fixes #5498
This commit is contained in:
Vincent Petry 2013-10-30 17:55:41 +01:00
parent d21a5b45f3
commit 19eeb618ff
1 changed files with 5 additions and 1 deletions

View File

@ -465,7 +465,11 @@ $(document).ready(function() {
crumb.text(text); crumb.text(text);
} }
$(document).click(function() { $(document).click(function(ev) {
// do not close when clicking in the dropdown
if ($(ev.target).closest('#new').length){
return;
}
$('#new>ul').hide(); $('#new>ul').hide();
$('#new').removeClass('active'); $('#new').removeClass('active');
if ($('#new .error').length > 0) { if ($('#new .error').length > 0) {