| Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| index ad82daf5eb7a579c37c2189075c0ae230aa3ebc9..ef53ffea6a4ab3fcfb4e461fa00dede13187a46d 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
|
| @@ -785,6 +785,10 @@ UI._focusChanged = function(event) {
|
| var document = event.target && event.target.ownerDocument;
|
| var element = document ? document.deepActiveElement() : null;
|
| UI.Widget.focusWidgetForNode(element);
|
| + if (!UI._keyboardFocus)
|
| + return;
|
| + element.setAttribute('data-keyboard-focus', 'true');
|
| + element.addEventListener('blur', () => element.removeAttribute('data-keyboard-focus'), {once: true, capture: true});
|
| };
|
|
|
| /**
|
| @@ -1182,6 +1186,10 @@ UI.LongClickController = class extends Common.Object {
|
| UI.initializeUIUtils = function(document, themeSetting) {
|
| document.defaultView.addEventListener('focus', UI._windowFocused.bind(UI, document), false);
|
| document.defaultView.addEventListener('blur', UI._windowBlurred.bind(UI, document), false);
|
| + document.addEventListener('keydown', event => {
|
| + UI._keyboardFocus = true;
|
| + document.defaultView.requestAnimationFrame(() => UI._keyboardFocus = false);
|
| + }, true);
|
| document.addEventListener('focus', UI._focusChanged.bind(UI), true);
|
|
|
| if (!UI.themeSupport)
|
| @@ -1413,14 +1421,6 @@ UI.appendStyle = function(node, cssFile) {
|
| this.checkboxElement.style.borderColor = color;
|
| },
|
|
|
| - /**
|
| - * @param {boolean} focus
|
| - * @this {Element}
|
| - */
|
| - set visualizeFocus(focus) {
|
| - this.checkboxElement.classList.toggle('dt-checkbox-visualize-focus', focus);
|
| - },
|
| -
|
| __proto__: HTMLLabelElement.prototype
|
| });
|
|
|
|
|