[Laszlo-checkins] r14290 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/dhtml test test/testIframeLinks
hqm@openlaszlo.org
hqm at openlaszlo.org
Wed Jul 8 04:52:03 PDT 2009
Author: hqm
Date: 2009-07-08 04:51:58 -0700 (Wed, 08 Jul 2009)
New Revision: 14290
Added:
openlaszlo/trunk/test/testIframeLinks/
openlaszlo/trunk/test/testIframeLinks/iframe.html
openlaszlo/trunk/test/testIframeLinks/select.html
openlaszlo/trunk/test/testIframeLinks/select.jsp
openlaszlo/trunk/test/testIframeLinks/select.lzx
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20090706-hqm-L by hqm at badtzmaru.home on 2009-07-06 10:51:16 EDT
in /Users/hqm/openlaszlo/trunk-diamond
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary:
New Features:
Bugs Fixed: LPP-8303, LPP-8306
Technical Reviewer: max
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ make the conditional code which prevents excessive object selection
for IE into a real quirk, quirks.prevent_selection, in all the places
it is called, instead of a conditional on the presence of 'IE' browser
+ Do not cancel the default browser behavior for mouse clicks, just cancel
bubbling.
Tests:
+ see testcase test/testIframeLinks/select.jsp
+ smokecheck dhtml
+ examples/components/component_sampler.lzx
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-07-08 08:00:15 UTC (rev 14289)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-07-08 11:51:58 UTC (rev 14290)
@@ -265,7 +265,7 @@
//Debug.warn('__show', this.owner);
// turn on text selection in IE
// can't use lz.embed.attachEventHandler because we need to cancel events selectively
- if (lz.embed.browser.isIE) {
+ if (LzSprite.prototype.quirks.prevent_selection) {
//this.__LZdiv.onselectstart = null;
this.__LZdiv.onselectstart = null;
}
@@ -368,7 +368,7 @@
// turn off text selection in IE
// can't use lz.embed.attachEventHandler because we need to cancel events selectively
if (LzInputTextSprite.prototype.__lastshown == null) {
- if (lz.embed.browser.isIE) {
+ if (LzSprite.prototype.quirks.prevent_selection) {
this.__LZdiv.onselectstart = LzTextSprite.prototype.__cancelhandler
}
}
@@ -1126,7 +1126,7 @@
// prevent text selection in IE
// can't use lz.embed.attachEventHandler because we need to cancel events
-if (LzSprite.prototype.quirks.ie_prevent_selection) {
+if (LzSprite.prototype.quirks.prevent_selection) {
document.onselectstart = function () {
var src = window.event.srcElement;
if (src.owner instanceof LzTextSprite) {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-07-08 08:00:15 UTC (rev 14289)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-07-08 11:51:58 UTC (rev 14290)
@@ -476,7 +476,7 @@
,fix_ie_clickable: false
,ie_alpha_image_loader: false
,ie_leak_prevention: false
- ,ie_prevent_selection: false
+ ,prevent_selection: false
,ie_elementfrompoint: false
,invisible_parent_image_sizing_fix: false
,emulate_flash_font_metrics: true
@@ -575,7 +575,7 @@
// prevent duplicate image loads - see http://support.microsoft.com/?scid=kb;en-us;823727&spid=2073&sid=global and http://misterpixel.blogspot.com/2006/09/forensic-analysis-of-ie6.html
quirks['ie6_improve_memory_performance'] = true;
} else {
- quirks['ie_prevent_selection'] = true;
+ quirks['prevent_selection'] = true;
quirks['invisible_parent_image_sizing_fix'] = true;
if (browser.osversion >= 6) {
// IE7 on Vista (osversion=6) needs the alpha image loader
@@ -1195,6 +1195,7 @@
LzSprite.prototype.__clickDispatcher = function(e) {
// capture events in IE
if (!e) e = window.event;
+
this.owner.__mouseEvent(e);
return false;
}
@@ -1212,10 +1213,8 @@
if (LzKeyboardKernel && LzKeyboardKernel['__updateControlKeys']) {
LzKeyboardKernel.__updateControlKeys(e);
- // FIXME: [20090602 anba] this prevents text selection, see LPP-8200
if (LzKeyboardKernel.__cancelKeys && e.keyCode == 0) {
- e.cancelBubble = true;
- e.returnValue = false;
+ e.cancelBubble = true;
}
}
}
@@ -1248,7 +1247,6 @@
e.cancelBubble = true;
this.__mouseisdown = true;
LzMouseKernel.__lastMouseDown = this;
-
} else if (eventname == 'onmouseup') {
e.cancelBubble = false;
// only send the event if this is same sprite the mouse button went down on
@@ -2474,6 +2472,7 @@
LzSprite.prototype.aafocus = function( ){
try {
if (this.__LZdiv != null) {
+ this.__LZdiv.blur();
this.__LZdiv.focus();
}
} catch (e) {
Added: openlaszlo/trunk/test/testIframeLinks/iframe.html
Property changes on: openlaszlo/trunk/test/testIframeLinks/iframe.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: openlaszlo/trunk/test/testIframeLinks/select.html
Property changes on: openlaszlo/trunk/test/testIframeLinks/select.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: openlaszlo/trunk/test/testIframeLinks/select.jsp
Property changes on: openlaszlo/trunk/test/testIframeLinks/select.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: openlaszlo/trunk/test/testIframeLinks/select.lzx
Property changes on: openlaszlo/trunk/test/testIframeLinks/select.lzx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
More information about the Laszlo-checkins
mailing list