Title: [257959] trunk/Source/WebInspectorUI
Revision
257959
Author
[email protected]
Date
2020-03-05 16:46:58 -0800 (Thu, 05 Mar 2020)

Log Message

Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
https://bugs.webkit.org/show_bug.cgi?id=208549
<rdar://problem/60020149>

Reviewed by Devin Rousso.

Remove focus cycling inside of the Styles and Computed panels.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (257958 => 257959)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-03-06 00:30:37 UTC (rev 257958)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-03-06 00:46:58 UTC (rev 257959)
@@ -1,3 +1,17 @@
+2020-03-05  Nikita Vasilyev  <[email protected]>
+
+        Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
+        https://bugs.webkit.org/show_bug.cgi?id=208549
+        <rdar://problem/60020149>
+
+        Reviewed by Devin Rousso.
+
+        Remove focus cycling inside of the Styles and Computed panels.
+
+        * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):
+
 2020-03-04  Devin Rousso  <[email protected]>
 
         Web Inspector: the execution context picker is shown on pages with only one execution context if there are internal execution contexts

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js (257958 => 257959)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2020-03-06 00:30:37 UTC (rev 257958)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2020-03-06 00:46:58 UTC (rev 257959)
@@ -236,24 +236,12 @@
 
     _handleForcedPseudoClassCheckboxKeydown(pseudoClass, event)
     {
-        if (event.key !== "Tab")
+        if (event.key !== "Tab" || event.shiftKey)
             return;
 
-        let pseudoClasses = WI.CSSManager.ForceablePseudoClasses;
-        let index = pseudoClasses.indexOf(pseudoClass);
-        if (event.shiftKey) {
-            if (index > 0) {
-                this._forcedPseudoClassCheckboxes[pseudoClasses[index - 1]].focus();
-                event.preventDefault();
-            } else {
-                this._filterBar.inputField.focus();
-                event.preventDefault();
-            }
-        } else {
-            if (index < pseudoClasses.length - 1) {
-                this._forcedPseudoClassCheckboxes[pseudoClasses[index + 1]].focus();
-                event.preventDefault();
-            } else if (this._panel.focusFirstSection) {
+        if (WI.CSSManager.ForceablePseudoClasses.lastValue === pseudoClass) {
+            // Last checkbox is currently focused.
+            if (this._panel.focusFirstSection) {
                 this._panel.focusFirstSection();
                 event.preventDefault();
             }
@@ -425,16 +413,11 @@
 
     _handleFilterBarInputFieldKeyDown(event)
     {
-        if (event.key !== "Tab")
+        if (event.key !== "Tab" || !event.shiftKey)
             return;
 
-        if (event.shiftKey) {
-            if (this._panel.focusLastSection) {
-                this._panel.focusLastSection();
-                event.preventDefault();
-            }
-        } else {
-            this._forcedPseudoClassCheckboxes[WI.CSSManager.ForceablePseudoClasses[0]].focus();
+        if (this._panel.focusLastSection) {
+            this._panel.focusLastSection();
             event.preventDefault();
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to