Changeset 112251 in webkit


Ignore:
Timestamp:
Mar 27, 2012 4:40:29 AM (12 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Editable TextViewer should show cursor when it is focused.
https://bugs.webkit.org/show_bug.cgi?id=82320

Reviewed by Pavel Feldman.

TextViewer now focuses editable inner container unless read-only flag is set.

  • inspector/front-end/TextViewer.js:

(WebInspector.TextViewer.prototype.focus):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype._handleElementFocus):
(WebInspector.TextEditorMainPanel.prototype.focus):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112249 r112251  
     12012-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Editable TextViewer should show cursor when it is focused.
     4        https://bugs.webkit.org/show_bug.cgi?id=82320
     5
     6        Reviewed by Pavel Feldman.
     7
     8        TextViewer now focuses editable inner container unless read-only flag is set.
     9
     10        * inspector/front-end/TextViewer.js:
     11        (WebInspector.TextViewer.prototype.focus):
     12        (WebInspector.TextEditorMainPanel):
     13        (WebInspector.TextEditorMainPanel.prototype._handleElementFocus):
     14        (WebInspector.TextEditorMainPanel.prototype.focus):
     15
    1162012-03-26  Levi Weintraub  <leviw@chromium.org>
    217
  • trunk/Source/WebCore/inspector/front-end/TextViewer.js

    r112064 r112251  
    101101    focus: function()
    102102    {
    103         this._mainPanel.element.focus();
     103        this._mainPanel.focus();
    104104    },
    105105
     
    905905
    906906    this.element.addEventListener("scroll", this._scroll.bind(this), false);
     907    this.element.addEventListener("focus", this._handleElementFocus.bind(this), false);
    907908
    908909    // In WebKit the DOMNodeRemoved event is fired AFTER the node is removed, thus it should be
     
    948949    {
    949950        return this._readOnly;
     951    },
     952
     953    _handleElementFocus: function()
     954    {
     955        if (!this._readOnly)
     956            this._container.focus();
     957    },
     958
     959    focus: function()
     960    {
     961        if (this._readOnly)
     962            this.element.focus();
     963        else
     964            this._container.focus();
    950965    },
    951966
Note: See TracChangeset for help on using the changeset viewer.