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

bargull@openlaszlo.org bargull at openlaszlo.org
Tue Dec 4 02:22:09 PST 2007


Author: bargull
Date: 2007-12-04 02:21:58 -0800 (Tue, 04 Dec 2007)
New Revision: 7440

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20071115-bargull-4 by bargull at dell--p4--2-53 on 2007-11-15 23:20:38
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: clickable- and visible-property in IE

New Features:

Bugs Fixed:
LPP-4916 - modaldialog cannot be dragged w/ IE7 DHTML in trunk build 6836
(and LPP-3539, LPP-4268, LPP-4919, LPP-5174, LPP-5179)

Technical Reviewer: max
QA Reviewer: promanik
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Depending on in which order you set "visible" and "clickable" attributes in dhtml/IE, you got phantom clickable views resp. non-clickable views at all. This was mainly caused by an unnecessary "else" in "LzSprite.prototype.setVisible(..)".


Tests:
see testcases at bugreports



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2007-12-04 08:29:22 UTC (rev 7439)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2007-12-04 10:21:58 UTC (rev 7440)
@@ -312,10 +312,10 @@
             this.quirks['absolute_position_accounts_for_offset'] = true;
             this.quirks['canvas_div_cannot_be_clipped'] = true;
         } else if (Lz.__BrowserDetect.isFirefox && Lz.__BrowserDetect.version < 2) {
-            // see http://groups.google.ca/group/netscape.public.mozilla.dom/browse_thread/thread/821271ca11a1bdbf/46c87b49c026246f?lnk=st&q=+focus+nsIAutoCompletePopup+selectedIndex&rnum=1
-            this.quirks['firefox_autocomplete_bug'] = true;
+                // see http://groups.google.ca/group/netscape.public.mozilla.dom/browse_thread/thread/821271ca11a1bdbf/46c87b49c026246f?lnk=st&q=+focus+nsIAutoCompletePopup+selectedIndex&rnum=1
+                this.quirks['firefox_autocomplete_bug'] = true;
+            }
         }
-    }
 
     if (this.quirks['safari_avoid_clip_position_input_text']) {
         LzSprite.prototype.__defaultStyles.lzswfinputtext.marginTop = '-2px';
@@ -577,8 +577,9 @@
         this.__setClickable(c, this.__LZclick);
         if (this.quirks.fix_clickable) {
             if (this.quirks.fix_ie_clickable) {
-                this.__LZclickdiv.style.display = c ? '' : 'none';
-                this.__LZclick.style.display = c ? '' : 'none';
+                //note: views with resources (__LZimg!) cannot have subviews (SWF-policy)
+                this.__LZclickdiv.style.display = c && this.visible ? '' : 'none';
+                this.__LZclick.style.display = c && this.visible ? '' : 'none';
             } else {
                 this.__LZclick.style.display = c ? 'block' : 'none';
             }
@@ -602,7 +603,7 @@
             }
             this.__setClickable(c, this.__LZclick);
             if (this.quirks.fix_ie_clickable) {
-                this.__LZclick.style.display = c ? '' : 'none';
+                this.__LZclick.style.display = c && this.visible ? '' : 'none';
             } else {
                 this.__LZclick.style.display = c ? 'block' : 'none';
             }
@@ -793,11 +794,10 @@
     this.visible = v;
     this.__LZdiv.style.display = v ? 'block' : 'none';
     if (this.quirks.fix_clickable) {
-        if (this.__LZclick && this.quirks.fix_ie_clickable) {
-            this.__LZclick.style.display = v ? '' : 'none';
-        } else {
-            this.__LZclickdiv.style.display = v ? 'block' : 'none';
+        if (this.quirks.fix_ie_clickable && this.__LZclick) {
+            this.__LZclick.style.display = v && this.clickable ? '' : 'none';
         }
+        this.__LZclickdiv.style.display = v ? 'block' : 'none';
     }
 }
 



More information about the Laszlo-checkins mailing list