Commit fd6b4f5b authored by einbinder's avatar einbinder Committed by Commit bot

DevTools: Don't update ViewportControl selection if there is no selection

BUG=none

Review-Url: https://codereview.chromium.org/2340403002
Cr-Commit-Position: refs/heads/master@{#419055}
parent d9fc4d9e
...@@ -287,7 +287,7 @@ WebInspector.ViewportControl.prototype = { ...@@ -287,7 +287,7 @@ WebInspector.ViewportControl.prototype = {
_updateSelectionModel: function(selection) _updateSelectionModel: function(selection)
{ {
var range = selection && selection.rangeCount ? selection.getRangeAt(0) : null; var range = selection && selection.rangeCount ? selection.getRangeAt(0) : null;
if (!range || selection.isCollapsed) { if (!range || selection.isCollapsed || !this.element.hasSelection()) {
this._headSelection = null; this._headSelection = null;
this._anchorSelection = null; this._anchorSelection = null;
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment