[Laszlo-checkins] r14150 - in openlaszlo/branches/4.4: . WEB-INF/lps/lfc/kernel/dhtml

ptw@openlaszlo.org ptw at openlaszlo.org
Tue Jun 16 08:37:47 PDT 2009


Author: ptw
Date: 2009-06-16 08:37:44 -0700 (Tue, 16 Jun 2009)
New Revision: 14150

Modified:
   openlaszlo/branches/4.4/
   openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
   openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Merged revisions 14146 via svnmerge from 
http://svn.openlaszlo.org/openlaszlo/trunk

.......
  r14146 | pbr | 2009-06-15 18:57:52 -0400 (Mon, 15 Jun 2009) | 34 lines
  
  Change 20090615-Philip-0 by Philip at Philip-DC on 2009-06-15 16:51:13 EDT
      in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: (REVISED) DHTML IE: Fix context menus on text
  
  New Features:
  
  Bugs Fixed:
  
  Technical Reviewer: andre
  QA Reviewer: max
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details:
  On the first call to document.elementFromPoint() in IE, it returns the scrolldiv created in LzTextSprite. As a result, the checks for context menu stopped (because the swf8mode checks were true).
  
  The fix is to add another conditional to see if the returned element is the scrolldiv. If so, ignore it and document.elementFromPoint() will be called a second time to return the desired element. I added a quirk, ie_elementfrompoint.
  
  This is still an issue for inputtext in dhtml (I tested with IE and FF). I created LPP-8268 to track this.
  
  
  Tests:
  See lpp-8254. Right clicking on text displays context menu in IE7/IE8. It continues to work in FF/Safari.
  
  Files:
  M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
  M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
  
  Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090615-Philip-0.tar
.......



Property changes on: openlaszlo/branches/4.4
___________________________________________________________________
Name: svnmerge-integrated
   - /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/4.2:1-12154,12181,13205,13778 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554,13476,13629 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-13938,13940-13945,13947-13952,13954-13968,13970,13972-13980,13982-13985,13987-14015,14017-14032,14034,14036-14069,14071-14109,14116,14124,14127,14129
   + /openlaszlo/branches/4.1:1-10153 /openlaszlo/branches/4.2:1-12154,12181,13205,13778 /openlaszlo/branches/devildog:1-8432 /openlaszlo/branches/pagan-deities:1-7955,8825,10756-10920,10922-10928,10930-10935,11151,11207,11554,13476,13629 /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7235 /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097,7872 /openlaszlo/trunk:1-13938,13940-13945,13947-13952,13954-13968,13970,13972-13980,13982-13985,13987-14015,14017-14032,14034,14036-14069,14071-14109,14116,14124,14127,14129,14146

Modified: openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2009-06-16 10:30:05 UTC (rev 14149)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js	2009-06-16 15:37:44 UTC (rev 14150)
@@ -259,6 +259,8 @@
                         // found a contextmenu
                         cmenu = owner.__contextmenu;
                         break;
+                    } else if (LzSprite.prototype.quirks.ie_elementfrompoint && owner.scrolldiv === elem) {
+                        // IE returns this first for text div. See LPP-8254
                     } else if (swf8mode && ((owner.__LZdiv === elem && owner.bgcolor != null)
                                     || owner instanceof LzTextSprite)) {
                         // swf8 compatibility: movieclips with bgcolor and textfields

Modified: openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-06-16 10:30:05 UTC (rev 14149)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2009-06-16 15:37:44 UTC (rev 14150)
@@ -458,6 +458,7 @@
     ,fix_ie_clickable: false
     ,ie_alpha_image_loader: false
     ,ie_leak_prevention: false
+    ,ie_elementfrompoint: false
     ,invisible_parent_image_sizing_fix: false
     ,emulate_flash_font_metrics: true
     // change \n to <br/>
@@ -621,6 +622,8 @@
             quirks['use_css_sprites'] = ! quirks['ie_alpha_image_loader'];
             // IE needs help focusing when an lztext is in the same area - LPP-8219
             quirks['textgrabsinputtextfocus'] = true;
+            // IE document.elementFromPoint() returns scrollbar div
+            quirks['ie_elementfrompoint'] = true;
         } else if (browser.isSafari) {
             // Remap alt/option key also sends control since control-click shows context menu (see LPP-2584 - Lzpix: problem with multi-selecting images in Safari 2.0.4, dhtml)
             quirks['alt_key_sends_control'] = true;



More information about the Laszlo-checkins mailing list