Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/devtools.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/devtools.js b/third_party/WebKit/Source/devtools/front_end/devtools.js |
| index 5e83ae3bb1ca36b38dfeedb22024902029e551ba..c831db8b7fe72a590489c17ec406489d72a03736 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/devtools.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/devtools.js |
| @@ -1088,6 +1088,20 @@ function installBackwardsCompatibility() |
| if (window.location.search.indexOf("remoteFrontend") === -1) |
| return; |
| + // Support for legacy (<M54) frontends. |
| + if (window.hasOwnProperty("onauxclick") && !window["InspectorFrontendAPI"].hasOwnProperty("onauxclick")) { |
|
dgozman
2016/08/03 20:54:28
This detection won't work: the hosting Chrome brow
Navid Zolghadr
2016/08/03 21:35:20
I tested this and this did cause my remote devtool
|
| + document.addEventListener("auxclick", function(e) { |
| + let target = e.target; |
| + if (target.shadowRoot) |
| + target = target.shadowRoot.activeElement; |
| + if (e.button !== 0) { |
| + target.dispatchEvent(new MouseEvent("click", e)); |
| + if (e.detail === 2) |
| + target.dispatchEvent(new MouseEvent("dblclick", e)); |
| + } |
| + }, true); |
| + } |
| + |
| // Support for legacy (<M53) frontends. |
| if (!window.KeyboardEvent.prototype.hasOwnProperty("keyIdentifier")) { |
| Object.defineProperty(window.KeyboardEvent.prototype, "keyIdentifier", { |