Web Inspector: Clicking style checkbox selects the property name while mouse down
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jul 2015 20:40:24 +0000 (20:40 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jul 2015 20:40:24 +0000 (20:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146728

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
Now returns if the click was not at the end of the line.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js

index 26b7de5..7027a2a 100644 (file)
@@ -1,3 +1,14 @@
+2015-07-08  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Clicking style checkbox selects the property name while mouse down
+        https://bugs.webkit.org/show_bug.cgi?id=146728
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+        (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
+        Now returns if the click was not at the end of the line.
+
 2015-07-08  Timothy Hatcher  <timothy@apple.com>
 
         REGRESSION (r185629): Web Inspector: Filtering doesn't display any items if folders are used to organize the web page resources
index 2f12f24..1aabaac 100644 (file)
@@ -446,13 +446,8 @@ WebInspector.CSSStyleDeclarationTextEditor = class CSSStyleDeclarationTextEditor
         var line = this._codeMirror.getLine(cursor.line);
         var trimmedLine = line.trimRight();
 
-        if (!trimmedLine.trimLeft().length)
-            return;
-
-        if (cursor.ch !== trimmedLine.length) {
-            this._highlightNextNameOrValue(this._codeMirror, cursor, line);
+        if (!trimmedLine.trimLeft().length || cursor.ch !== trimmedLine.length)
             return;
-        }
 
         this._mouseDownCursorPosition = cursor;
     }