Commit e1bacfb3 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: do not act on link click if there is selection

Selecting text that includes a link can unexpectedly open the link in
a new tab. This CL only allows link actions when the link has no

Bug: 783965
Change-Id: I790f85211a80809fdfce94cfce8ddecde2d0d5be
Reviewed-on: 's avatarPavel Feldman <>
Commit-Queue: Erik Luo <>
Cr-Commit-Position: refs/heads/master@{#516137}
parent 4ce68f88
......@@ -490,7 +490,7 @@ Components.Linkifier = class {
static _handleClick(event) {
var link = /** @type {!Element} */ (event.currentTarget);
if (UI.isBeingEdited(/** @type {!Node} */ (
if (UI.isBeingEdited(/** @type {!Node} */ ( || link.hasSelection())
var actions = Components.Linkifier._linkActions(link);
if (actions.length)
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