From c54a3cb4ff0fdadc7f708b2b90ca919c9e784301 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 26 Feb 2012 00:44:04 +0100 Subject: Wiki page editor: Do not lose editor focus when clicking a toolbar button. --- static/js/wiki.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'static') diff --git a/static/js/wiki.js b/static/js/wiki.js index a208f36..4b87549 100644 --- a/static/js/wiki.js +++ b/static/js/wiki.js @@ -59,11 +59,19 @@ jQuery(function ($) { Aloha.ready(function() { var $$ = Aloha.jQuery; - $('#wiki-page-content').on('blur', function() { + + $('html').click(function() { mulk.savePage(); $$('#wiki-page-content').mahalo(); }); - $('#wiki-page-content').dblclick(function() { + $('#wiki-page-content').click(function(event) { + event.stopPropagation(); + }); + $('.aloha-floatingmenu').click(function(event) { + event.stopPropagation(); + }); + + $('#wiki-page-content').click(function() { $$('#wiki-page-content').aloha(); }); }); -- cgit v1.2.3