[Laszlo-checkins] r14146 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml
pbr@openlaszlo.org
pbr at openlaszlo.org
Mon Jun 15 15:57:55 PDT 2009
Author: pbr
Date: 2009-06-15 15:57:52 -0700 (Mon, 15 Jun 2009)
New Revision: 14146
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
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
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js 2009-06-15 20:56:41 UTC (rev 14145)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js 2009-06-15 22:57:52 UTC (rev 14146)
@@ -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/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-15 20:56:41 UTC (rev 14145)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-15 22:57:52 UTC (rev 14146)
@@ -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