[Laszlo-checkins] r10862 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/dhtml lps/includes/source
max@openlaszlo.org
max at openlaszlo.org
Wed Sep 3 11:50:01 PDT 2008
Author: max
Date: 2008-09-03 11:49:52 -0700 (Wed, 03 Sep 2008)
New Revision: 10862
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/trunk/lps/includes/source/embednew.js
Log:
Change 20080902-maxcarlson-z by maxcarlson at Bank on 2008-09-02 13:03:48 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix dhtml in iPhone
Bugs Fixed: LPP-6595 - 4.1 DHTML lz.browser.ieIE returns undefined instead of false for non-IE browsers, LPP-6564 - OpenLaszlo iphone 1.1.3 DHTML: can't type in inputtext
Technical Reviewer: ptw
QA Reviewer: hminsky
Details: LzSprite.js - Add new listen_for_mouseover_out quirk, default to true. Turn off activate_on_mouseover and listen_for_mouseover_out quirks for iPhone. Never register for onmouseover/out events when listen_for_mouseover_out quirk is false.
embednew.js - Explicitly set lz.browser.is* to false. Add detection logic for iPhone, setting isSafari and isIphone to true.
Tests: Hmm, not sure how one would test this without an iPhone. Maybe someone has one? I swear, it works for me :). See LPP-6564 for more details (from quirksmode/ptw) on why I think this is the right fix.
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-09-03 16:57:34 UTC (rev 10861)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2008-09-03 18:49:52 UTC (rev 10862)
@@ -311,6 +311,7 @@
,ie6_improve_memory_performance: false
,text_height_includes_margins: false
,inputtext_size_includes_margin: false
+ ,listen_for_mouseover_out: true
}
LzSprite.prototype.capabilities = {
@@ -430,6 +431,12 @@
quirks['keypress_function_keys'] = false;
// Safari 3.x does not send global key events to apps embedded in an iframe
quirks['keyboardlistentotop'] = true;
+
+ // turn off mouseover activation for iphone
+ if (browser.isIphone) {
+ quirks['activate_on_mouseover'] = false;
+ quirks['listen_for_mouseover_out'] = false;
+ }
} else if (browser.isOpera) {
// Fix bug in where if any parent of an image is hidden the size is 0
quirks['invisible_parent_image_sizing_fix'] = true;
@@ -813,7 +820,7 @@
div.ondblclick = f;
div.onmouseenter = f;
div.onmouseleave = f;
- } else {
+ } else if (this.quirks.listen_for_mouseover_out) {
div.onmouseover = f;
div.onmouseout = f;
}
Modified: openlaszlo/trunk/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/trunk/lps/includes/source/embednew.js 2008-09-03 16:57:34 UTC (rev 10861)
+++ openlaszlo/trunk/lps/includes/source/embednew.js 2008-09-03 18:49:52 UTC (rev 10862)
@@ -432,6 +432,7 @@
|| "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
this.initted = true;
+ this.isNetscape = this.isSafari = this.isOpera = this.isFirefox = this.isIE = this.isIphone = false;
if (this.browser == 'Netscape') {
// currently only used for IE spoofing NS8
this.isNetscape = true;
@@ -444,6 +445,9 @@
} else if (this.browser == 'Explorer') {
// true if we're on ie and not being spoofed
this.isIE = true;
+ } else if (this.browser == 'iPhone') {
+ this.isSafari = true;
+ this.isIphone = true;
}
},
searchString: function (data) {
@@ -467,6 +471,12 @@
dataBrowser: [
{
string: navigator.userAgent,
+ subString: "iPhone",
+ identity: "iPhone",
+ versionSearch: "WebKit"
+ },
+ {
+ string: navigator.userAgent,
subString: "Apple",
identity: "Safari",
versionSearch: "WebKit"
More information about the Laszlo-checkins
mailing list