Permalink
Browse files

Fix for component being disposed before the timeout function is called.

R=nicksantos
DELTA=4 (3 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=6168


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2451 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information...
1 parent 5c34e87 commit 7c2f0de0a39dd14b4211eed39f1b9b2c84a71a5e mleibman@google.com committed Jan 18, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 closure/goog/ui/labelinput.js
View
5 closure/goog/ui/labelinput.js
@@ -259,7 +259,10 @@ goog.ui.LabelInput.prototype.handleFocus_ = function(e) {
if (!this.hasChanged() && !this.inFocusAndSelect_) {
var me = this;
var clearValue = function() {
- me.getElement().value = '';
+ // Component could be disposed by the time this is called.
+ if (me.getElement()) {
+ me.getElement().value = '';
+ }
};
if (goog.userAgent.IE) {
goog.Timer.callOnce(clearValue, 10);

0 comments on commit 7c2f0de

Please sign in to comment.