]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix double destroy on escape.
authorThomas Tanghus <thomas@tanghus.net>
Wed, 11 Sep 2013 15:13:39 +0000 (17:13 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Wed, 11 Sep 2013 15:13:39 +0000 (17:13 +0200)
core/js/jquery.ocdialog.js

index fb161440ebb89a7142aeec1c516d93954c8e9327..f1836fd4727f7d09d8ed5c97e80d4d0f62d93149 100644 (file)
@@ -39,7 +39,8 @@
                                        return;
                                }
                                // Escape
-                               if(event.keyCode === 27 && self.options.closeOnEscape) {
+                               if(event.keyCode === 27 && event.type === 'keydown' && self.options.closeOnEscape) {
+                                       event.stopImmediatePropagation();
                                        self.close();
                                        return false;
                                }