Changeset 112267 in webkit


Ignore:
Timestamp:
Mar 27, 2012 7:51:03 AM (12 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Tabbed pane should set focus on its contents on tab click.
https://bugs.webkit.org/show_bug.cgi?id=82323

Reviewed by Pavel Feldman.

Otherwise selected tab does not have focus.
Also added tabIndex on tabElements to prevent pasting on closing middle click.

  • inspector/front-end/TabbedPane.js:

(WebInspector.TabbedPane):
(WebInspector.TabbedPane.prototype.focus):
(WebInspector.TabbedPane.prototype.selectTab):
(WebInspector.TabbedPaneTab.prototype._createTabElement):
(WebInspector.TabbedPaneTab.prototype._tabClicked):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112266 r112267  
     12012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Tabbed pane should set focus on its contents on tab click.
     4        https://bugs.webkit.org/show_bug.cgi?id=82323
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Otherwise selected tab does not have focus.
     9        Also added tabIndex on tabElements to prevent pasting on closing middle click.
     10
     11        * inspector/front-end/TabbedPane.js:
     12        (WebInspector.TabbedPane):
     13        (WebInspector.TabbedPane.prototype.focus):
     14        (WebInspector.TabbedPane.prototype.selectTab):
     15        (WebInspector.TabbedPaneTab.prototype._createTabElement):
     16        (WebInspector.TabbedPaneTab.prototype._tabClicked):
     17
    1182012-03-27  Pavel Podivilov  <podivilov@chromium.org>
    219
  • trunk/Source/WebCore/inspector/front-end/TabbedPane.js

    r111430 r112267  
    8787    },
    8888
     89    focus: function()
     90    {
     91        if (!this.visibleView)
     92            return;
     93        if (typeof(this.visibleView.focus) === "function")
     94            this.visibleView.focus();
     95        else
     96            this.visibleView.element.focus();
     97    },
     98
    8999    /**
    90100     * @param {string} id
     
    173183       
    174184        this._updateTabElements();
    175        
     185
    176186        var eventData = { tabId: id, view: tab.view, isUserGesture: userGesture };
    177187        this.dispatchEventToListeners(WebInspector.TabbedPane.EventTypes.TabSelected, eventData);
     
    589599        var tabElement = document.createElement("div");
    590600        tabElement.addStyleClass("tabbed-pane-header-tab");
     601        tabElement.tabIndex = -1;
    591602       
    592603        var titleElement = tabElement.createChild("span", "tabbed-pane-header-tab-title");
     
    628639        else
    629640            this._tabbedPane.selectTab(this.id, true);
     641        this._tabbedPane.focus();
    630642    }
    631643}
Note: See TracChangeset for help on using the changeset viewer.