Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3688)

Unified Diff: Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 413413003: DevTools: [Elements] Do not copy nodes if there is a non-collapsed selection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/elements/ElementsTreeOutline.js
diff --git a/Source/devtools/front_end/elements/ElementsTreeOutline.js b/Source/devtools/front_end/elements/ElementsTreeOutline.js
index be32a15c8284d776268d7dc3383bbe45d230df36..bdcbd815d732caf43122d15a0c8eef6d52049c98 100644
--- a/Source/devtools/front_end/elements/ElementsTreeOutline.js
+++ b/Source/devtools/front_end/elements/ElementsTreeOutline.js
@@ -185,6 +185,10 @@ WebInspector.ElementsTreeOutline.prototype = {
{
this._setClipboardData(null);
+ // Don't prevent the normal copy if the user has a selection.
+ if (!window.getSelection().isCollapsed)
+ return;
+
// Do not interfere with text editing.
var currentFocusElement = WebInspector.currentFocusElement();
if (currentFocusElement && WebInspector.isBeingEdited(currentFocusElement))

Powered by Google App Engine
This is Rietveld 408576698