[Laszlo-checkins] r13830 - openlaszlo/trunk/lps/includes/source
max@openlaszlo.org
max at openlaszlo.org
Thu May 7 17:44:05 PDT 2009
Author: max
Date: 2009-05-07 17:44:04 -0700 (Thu, 07 May 2009)
New Revision: 13830
Modified:
openlaszlo/trunk/lps/includes/source/iframemanager.js
Log:
Change 20090507-maxcarlson-i by maxcarlson at Bank on 2009-05-07 15:59:17 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: UPDATED: Fix mouse events for views on top of iframes in IE
Bugs Fixed: LPP-8160 - View over iframe doesn't get mouse events in IE
Technical Reviewer: hminsky
QA Reviewer: lorien at laszlosystems.com
Details: iframemanager - Listen for global mouseover events in IE, then reset the mouse when it's not over an iframe.
Tests: See LPP-8160
Modified: openlaszlo/trunk/lps/includes/source/iframemanager.js
===================================================================
--- openlaszlo/trunk/lps/includes/source/iframemanager.js 2009-05-07 23:01:00 UTC (rev 13829)
+++ openlaszlo/trunk/lps/includes/source/iframemanager.js 2009-05-08 00:44:04 UTC (rev 13830)
@@ -232,6 +232,9 @@
this.__loading[id] = false;
var iframe = lz.embed.iframemanager.getFrameWindow(id);
// bind into global events.
+ if (lz.embed.browser.isIE) {
+ lz.embed.attachEventHandler(document, 'mouseover', lz.embed.iframemanager, '__globalMouseover', id);
+ }
try {
lz.embed.attachEventHandler(iframe.document, 'mousedown', lz.embed.iframemanager, '__mouseEvent', id);
lz.embed.attachEventHandler(iframe.document, 'mouseup', lz.embed.iframemanager, '__mouseEvent', id);
@@ -288,6 +291,9 @@
}
var iframe = lz.embed.iframemanager.__frames[id];
if (iframe) {
+ if (lz.embed.browser.isIE) {
+ lz.embed.removeEventHandler(document, 'mouseover', lz.embed.iframemanager, '__globalMouseover');
+ }
// remove event listeners
try {
lz.embed.removeEventHandler(iframe.document, 'mousedown', lz.embed.iframemanager, '__mouseEvent');
@@ -335,9 +341,21 @@
} catch (e) {
}
}
+ ,__globalMouseover: function(e, id) {
+ var iframe = lz.embed.iframemanager.getFrame(id);
+ if (! iframe) return;
+ e = window.event;
+
+ // DHTML only...
+ if (iframe.owner && iframe.owner.sprite) {
+ // Turn mouse events back on unless this was over an iframe
+ if (e.toElement && e.toElement.nodeName != 'IFRAME') {
+ LzMouseKernel.__resetMouse();
+ }
+ }
+ }
,__mouseEvent: function(e, id) {
var iframe = lz.embed.iframemanager.getFrame(id);
- //console.log('__gotload', iframe;
if (! iframe) return;
if (!e) {
More information about the Laszlo-checkins
mailing list