Title: [217072] trunk/Source/WebInspectorUI
- Revision
- 217072
- Author
- [email protected]
- Date
- 2017-05-18 15:33:30 -0700 (Thu, 18 May 2017)
Log Message
REGRESSION (r?): Web Inspector: Shift-click on color square in Styles sidebar should not select text
https://bugs.webkit.org/show_bug.cgi?id=171902
Reviewed by Matt Baker.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
Do not attempt to select text if the element being clicked is a bookmark (such as a swatch).
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (217071 => 217072)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-05-18 22:14:54 UTC (rev 217071)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-05-18 22:33:30 UTC (rev 217072)
@@ -1,3 +1,14 @@
+2017-05-18 Devin Rousso <[email protected]>
+
+ REGRESSION (r?): Web Inspector: Shift-click on color square in Styles sidebar should not select text
+ https://bugs.webkit.org/show_bug.cgi?id=171902
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+ (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
+ Do not attempt to select text if the element being clicked is a bookmark (such as a swatch).
+
2017-05-18 Joseph Pecoraro <[email protected]>
Web Inspector: Web Socket Document Icon
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (217071 => 217072)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2017-05-18 22:14:54 UTC (rev 217071)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2017-05-18 22:33:30 UTC (rev 217072)
@@ -452,7 +452,20 @@
return;
let cursor = this._codeMirror.coordsChar({left: event.x, top: event.y});
- if (this._mouseDownCursorPosition.line === cursor.line && this._mouseDownCursorPosition.ch === cursor.ch) {
+
+ let clickedBookmark = false;
+ for (let marker of this._codeMirror.findMarksAt(cursor)) {
+ if (marker.type !== "bookmark" || marker.replacedWith !== event.target)
+ continue;
+
+ let pos = marker.find();
+ if (pos.line === cursor.line && Math.abs(pos.ch - cursor.ch) <= 1) {
+ clickedBookmark = true;
+ break;
+ }
+ }
+
+ if (!clickedBookmark && this._mouseDownCursorPosition.line === cursor.line && this._mouseDownCursorPosition.ch === cursor.ch) {
let line = this._codeMirror.getLine(cursor.line);
if (cursor.ch === line.trimRight().length) {
let nextLine = this._codeMirror.getLine(cursor.line + 1);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes