Changeset 182646 in webkit


Ignore:
Timestamp:
Apr 10, 2015, 5:50:42 PM (10 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Fix Console Message Toggle

Unreviewed. Correct a post-review comment fix that went too far.

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype.set expandable):
The handler needed to be bound to the object.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r182645 r182646  
     12015-04-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Fix Console Message Toggle
     4
     5        Unreviewed. Correct a post-review comment fix that went too far.
     6
     7        * UserInterface/Views/ConsoleMessageView.js:
     8        (WebInspector.ConsoleMessageView.prototype.set expandable):
     9        The handler needed to be bound to the object.
     10
    1112015-04-10  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js

    r182644 r182646  
    146146            return;
    147147
     148        if (!this._boundClickHandler)
     149            this._boundClickHandler = this.toggle.bind(this);
     150
    148151        var becameExpandable = this._element.classList.toggle("expandable", x);
    149152
    150153        if (becameExpandable)
    151             this._messageTextElement.addEventListener("click", this.toggle);
     154            this._messageTextElement.addEventListener("click", this._boundClickHandler);
    152155        else
    153             this._messageTextElement.removeEventListener("click", this.toggle);
     156            this._messageTextElement.removeEventListener("click", this._boundClickHandler);
    154157    }
    155158
Note: See TracChangeset for help on using the changeset viewer.