Skip to content
Permalink
Browse files
Web Inspector: Console: dragging a selection outside the selected ele…
…ment 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.


Canonical link: https://commits.webkit.org/209400@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dcrousso committed Feb 26, 2019
1 parent cd54820 commit 981361c9e4f1c0bba3096d2f89a49e8a19b3c988
Showing 2 changed files with 25 additions and 5 deletions.
@@ -1,3 +1,18 @@
2019-02-26 Devin Rousso <drousso@apple.com>

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 <pecoraro@apple.com>

Web Inspector: Rename LineChart to AreaChart
@@ -532,13 +532,13 @@ WI.LogContentView = class LogContentView extends WI.ContentView

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);
selection.removeAllRanges();
}
if (!selection.isCollapsed)
wrapper = selection.focusNode.enclosingNodeOrSelfWithClass(WI.LogContentView.ItemWrapperStyleClassName);

if (!wrapper)
if (!wrapper) {
selection.removeAllRanges();
return;
}
}

if (!selection.isCollapsed)
@@ -547,6 +547,10 @@ WI.LogContentView = class LogContentView extends WI.ContentView
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 @@ WI.LogContentView = class LogContentView extends WI.ContentView
} else {
message.classList.add(WI.LogContentView.SelectedStyleClassName);
this._selectedMessages.push(message);
this._selectionRange = null;
}

if (!rangeSelection)

0 comments on commit 981361c

Please sign in to comment.