Bug 1288929 - Fix double-click on div and blockquote. r=aceman a=jorgk DONTBUILD
authorJorg K <mozilla@jorgk.com>
Mon, 25 Jul 2016 12:57:25 +0200
changeset 27316 2c3312bd6c31dc72b208b6975def78b36f766dd0
parent 27315 f226b98eb36956451bcd2c0f7c0c58386db7bfb3
child 27317 e3dce3ebf4ddf47ef5c05dd2de69aa55aa954048
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman, jorgk
bugs1288929
Bug 1288929 - Fix double-click on div and blockquote. r=aceman a=jorgk DONTBUILD
editor/ui/composer/content/editor.js
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -1596,20 +1596,21 @@ function EditorDblClick(event)
     } catch (e) {}
 
      //  We use "href" instead of "a" to not be fooled by named anchor
     if (!element)
       try {
         element = GetCurrentEditor().getSelectedElement("href");
       } catch (e) {}
 
-    // Don't fire for body/p. It's common that people try to double-click
+    // Don't fire for body/p and other block elements.
+    // It's common that people try to double-click
     // to select a word, but the click hits an empty area.
-    if (element && element.nodeName.toLowerCase() != "body" &&
-        element.nodeName.toLowerCase() != "p")
+    if (element &&
+        !["body","p","blockquote","div"].includes(element.nodeName.toLowerCase()))
     {
       goDoCommand("cmd_objectProperties");  
       event.preventDefault();
     }
   }
 }
 
 function EditorClick(event)