Title: [242078] trunk/Source/WebInspectorUI
- Revision
- 242078
- Author
- [email protected]
- Date
- 2019-02-26 00:00:26 -0800 (Tue, 26 Feb 2019)
Log Message
Web Inspector: Console: dragging a selection outside the selected element clears the selection
https://bugs.webkit.org/show_bug.cgi?id=194660
<rdar://problem/46719239>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._mousemove):
Don't clear the selection if the target of the "mousemove" is outside of the view.
(WI.LogContentView.prototype._updateMessagesSelection):
Drive-by: clear the saved selected messages when we're just selecting a single message.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (242077 => 242078)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-02-26 07:38:55 UTC (rev 242077)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-02-26 08:00:26 UTC (rev 242078)
@@ -1,3 +1,18 @@
+2019-02-26 Devin Rousso <[email protected]>
+
+ Web Inspector: Console: dragging a selection outside the selected element clears the selection
+ https://bugs.webkit.org/show_bug.cgi?id=194660
+ <rdar://problem/46719239>
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/LogContentView.js:
+ (WI.LogContentView.prototype._mousemove):
+ Don't clear the selection if the target of the "mousemove" is outside of the view.
+
+ (WI.LogContentView.prototype._updateMessagesSelection):
+ Drive-by: clear the saved selected messages when we're just selecting a single message.
+
2019-02-25 Joseph Pecoraro <[email protected]>
Web Inspector: Rename LineChart to AreaChart
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (242077 => 242078)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js 2019-02-26 07:38:55 UTC (rev 242077)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js 2019-02-26 08:00:26 UTC (rev 242078)
@@ -532,13 +532,13 @@
if (!wrapper) {
// No wrapper under the mouse, so look at the selection to try and find one.
- if (!selection.isCollapsed) {
- wrapper = selection.focusNode.parentNode.enclosingNodeOrSelfWithClass(WI.LogContentView.ItemWrapperStyleClassName);
+ if (!selection.isCollapsed)
+ wrapper = selection.focusNode.enclosingNodeOrSelfWithClass(WI.LogContentView.ItemWrapperStyleClassName);
+
+ if (!wrapper) {
selection.removeAllRanges();
+ return;
}
-
- if (!wrapper)
- return;
}
if (!selection.isCollapsed)
@@ -547,6 +547,10 @@
if (wrapper === this._mouseDownWrapper && !this._mouseMoveIsRowSelection)
return;
+ // Don't change the selection if the mouse has moved outside of the view (e.g. for faster scrolling).
+ if (!this.element.contains(event.target))
+ return;
+
selection.removeAllRanges();
if (!this._mouseMoveIsRowSelection)
@@ -657,6 +661,7 @@
} else {
message.classList.add(WI.LogContentView.SelectedStyleClassName);
this._selectedMessages.push(message);
+ this._selectionRange = null;
}
if (!rangeSelection)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes