changeset 1548:872728900163

Double click modify only in content area
author Jaiditya Mathur <jaiditya.mathur@gmail.com>
date Thu, 19 Jul 2012 13:24:25 +0530
parents db4b1477d53d
children f9ac0030dac6
files MoinMoin/templates/common.js
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/common.js	Thu Jul 19 13:22:03 2012 +0530
+++ b/MoinMoin/templates/common.js	Thu Jul 19 13:24:25 2012 +0530
@@ -5,7 +5,7 @@
 /*global $:false */
 
 
-// Enter edit mode when user doubleclicks within the page body.  Executed once on page load.
+// Enter edit mode when user doubleclicks within the content area.  Executed once on page load.
 function editOnDoubleClick() {
     "use strict";
     var modifyButton;
@@ -13,8 +13,8 @@
     if (document.getElementById('moin-edit-on-doubleclick')) {
         modifyButton = $('.moin-modify-button')[0];
         if (modifyButton) {
-            // add a doubleclick action to the body tag
-            $('body').dblclick(function () {
+            // add a doubleclick action to the moin content
+            $('#moin-content').dblclick(function () {
                 document.location = modifyButton.href;
             });
         }