[Laszlo-checkins] r14363 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml

max@openlaszlo.org max at openlaszlo.org
Tue Jul 21 19:01:45 PDT 2009


Author: max
Date: 2009-07-21 19:01:39 -0700 (Tue, 21 Jul 2009)
New Revision: 14363

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
Log:
Change 20090721-maxcarlson-x by maxcarlson at Bank.local on 2009-07-21 13:58:56 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Prevent exceptions when hiding an inputtext that's not showing

Bugs Fixed: LPP-8301 - In dhtml an error occurs when mousing over an iframe when focus is in a text component that is not visible

Technical Reviewer: hminsky
QA Reviewer: mdemmon

Details: Check to see if the child is attached to its parent before attempting to remove it.

Tests: See LPP-8301.



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2009-07-21 21:01:02 UTC (rev 14362)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2009-07-22 02:01:39 UTC (rev 14363)
@@ -343,9 +343,13 @@
         // be a child of the clickable view.
 
         this.__setglobalclickable(true);
-        this.__LzInputDiv = this.__LZclickcontainerdiv.removeChild(this.__LzInputDiv);
+        if (this.__LzInputDiv.parentNode == this.__LZclickcontainerdiv) {
+            this.__LzInputDiv = this.__LZclickcontainerdiv.removeChild(this.__LzInputDiv);
+        }
     } else {
-        this.__LzInputDiv = this.__LZinputclickdiv.removeChild(this.__LzInputDiv);
+        if (this.__LzInputDiv.parentNode == this.__LZinputclickdiv) {
+            this.__LzInputDiv = this.__LZinputclickdiv.removeChild(this.__LzInputDiv);
+        }
     }
     this.__LZdiv.appendChild(this.__LzInputDiv);
     //Debug.warn('__hide', this.owner);



More information about the Laszlo-checkins mailing list