Title: [117775] branches/chromium/1132/Source/WebCore/inspector/front-end/TextPrompt.js
- Revision
- 117775
- Author
- [email protected]
- Date
- 2012-05-21 06:18:42 -0700 (Mon, 21 May 2012)
Log Message
Merge 116305 - Web Inspector: [TextPrompt] Event listeners and CSS style are not removed on detachment
https://bugs.webkit.org/show_bug.cgi?id=85789
Reviewed by Yury Semikhatsky.
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.prototype.detach):
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10408041
Modified Paths
Diff
Modified: branches/chromium/1132/Source/WebCore/inspector/front-end/TextPrompt.js (117774 => 117775)
--- branches/chromium/1132/Source/WebCore/inspector/front-end/TextPrompt.js 2012-05-21 13:02:57 UTC (rev 117774)
+++ branches/chromium/1132/Source/WebCore/inspector/front-end/TextPrompt.js 2012-05-21 13:18:42 UTC (rev 117775)
@@ -112,7 +112,7 @@
this.proxyElement.appendChild(element);
this._element.addStyleClass("text-prompt");
this._element.addEventListener("keydown", this._boundOnKeyDown, false);
- this._element.addEventListener("selectstart", this._selectStart.bind(this), false);
+ this._element.addEventListener("selectstart", this._boundSelectStart, false);
if (typeof this._suggestBoxClassName === "string")
this._suggestBox = new WebInspector.TextPrompt.SuggestBox(this, this._element, this._suggestBoxClassName);
@@ -125,6 +125,9 @@
this._removeFromElement();
this.proxyElement.parentElement.insertBefore(this._element, this.proxyElement);
this.proxyElement.parentElement.removeChild(this.proxyElement);
+ this._element.removeStyleClass("text-prompt");
+ this._element.removeEventListener("keydown", this._boundOnKeyDown, false);
+ this._element.removeEventListener("selectstart", this._boundSelectStart, false);
delete this._proxyElement;
WebInspector.restoreFocusFromElement(this._element);
},
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes