Changeset 257959 in webkit


Ignore:
Timestamp:
Mar 5, 2020, 4:46:58 PM (5 years ago)
Author:
Nikita Vasilyev
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):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r257873 r257959  
     12020-03-05  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
     4        https://bugs.webkit.org/show_bug.cgi?id=208549
     5        <rdar://problem/60020149>
     6
     7        Reviewed by Devin Rousso.
     8
     9        Remove focus cycling inside of the Styles and Computed panels.
     10
     11        * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
     12        (WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
     13        (WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):
     14
    1152020-03-04  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js

    r253242 r257959  
    237237    _handleForcedPseudoClassCheckboxKeydown(pseudoClass, event)
    238238    {
    239         if (event.key !== "Tab")
    240             return;
    241 
    242         let pseudoClasses = WI.CSSManager.ForceablePseudoClasses;
    243         let index = pseudoClasses.indexOf(pseudoClass);
    244         if (event.shiftKey) {
    245             if (index > 0) {
    246                 this._forcedPseudoClassCheckboxes[pseudoClasses[index - 1]].focus();
    247                 event.preventDefault();
    248             } else {
    249                 this._filterBar.inputField.focus();
    250                 event.preventDefault();
    251             }
    252         } else {
    253             if (index < pseudoClasses.length - 1) {
    254                 this._forcedPseudoClassCheckboxes[pseudoClasses[index + 1]].focus();
    255                 event.preventDefault();
    256             } else if (this._panel.focusFirstSection) {
     239        if (event.key !== "Tab" || event.shiftKey)
     240            return;
     241
     242        if (WI.CSSManager.ForceablePseudoClasses.lastValue === pseudoClass) {
     243            // Last checkbox is currently focused.
     244            if (this._panel.focusFirstSection) {
    257245                this._panel.focusFirstSection();
    258246                event.preventDefault();
     
    426414    _handleFilterBarInputFieldKeyDown(event)
    427415    {
    428         if (event.key !== "Tab")
    429             return;
    430 
    431         if (event.shiftKey) {
    432             if (this._panel.focusLastSection) {
    433                 this._panel.focusLastSection();
    434                 event.preventDefault();
    435             }
    436         } else {
    437             this._forcedPseudoClassCheckboxes[WI.CSSManager.ForceablePseudoClasses[0]].focus();
     416        if (event.key !== "Tab" || !event.shiftKey)
     417            return;
     418
     419        if (this._panel.focusLastSection) {
     420            this._panel.focusLastSection();
    438421            event.preventDefault();
    439422        }
Note: See TracChangeset for help on using the changeset viewer.