Bug 530495 - textbox.xml throw an error (line 175) if the textbox.inputField didn't exist (r=neil)
author21@vingtetun.org
Wed, 25 Nov 2009 11:49:52 -0800
changeset 35235 4e7e8661f64d6dba8cbaaab8db8647d9110c94aa
parent 35234 da736df98b8c2f48470af8a7e980837334790025
child 35236 ba9a490a6ef8b123396bd586ac82d32d7f551533
child 35371 26929c6ceb08173240b23fa009f1e5d8ec879e46
push idunknown
push userunknown
push dateunknown
reviewersneil
bugs530495
milestone1.9.3a1pre
Bug 530495 - textbox.xml throw an error (line 175) if the textbox.inputField didn't exist (r=neil)
toolkit/content/widgets/textbox.xml
--- a/toolkit/content/widgets/textbox.xml
+++ b/toolkit/content/widgets/textbox.xml
@@ -166,19 +166,19 @@
               !this.value &&
               this.emptyText) {
 
             if (!this.hasAttribute("isempty")) {
               this.setAttribute("isempty", "true");
 
               // Hide the emptytext for a bit, in case the textbox will be focused subsequently
               this.inputField.setAttribute("emptytextdelay", "true");
-              setTimeout(function (textbox) {
-                textbox.inputField.removeAttribute("emptytextdelay");
-              }, 100, this);
+              setTimeout(function (input) {
+                input.removeAttribute("emptytextdelay");
+              }, 100, this.inputField);
 
               try {
                 this.editor.transactionManager.beginBatch();
               } catch (e) {}
             }
 
             this.inputField.value = this.emptyText;
           }