[Laszlo-checkins] r14064 - in openlaszlo/branches/4.4: . WEB-INF/lps/lfc/kernel/dhtml
ptw@openlaszlo.org
ptw at openlaszlo.org
Thu Jun 4 12:17:17 PDT 2009
Author: ptw
Date: 2009-06-04 12:17:13 -0700 (Thu, 04 Jun 2009)
New Revision: 14064
Modified:
openlaszlo/branches/4.4/
openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Merged revisions 14052 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk
.......
r14052 | max | 2009-06-03 21:45:59 -0400 (Wed, 03 Jun 2009) | 18 lines
Change 20090602-maxcarlson-i by maxcarlson at Bank on 2009-06-02 16:37:12 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix IE to select inputtexts that share the same area as a text
Bugs Fixed: LPP-8219 - IE DHTML: inputtext focus/selection issues
Technical Reviewer: hminsky
QA Reviewer: mdemmon
Details: LzSprite - Add textgrabsinputtextfocus quirk, set to true for IE.
LzInputTextSprite - __hideIfNotFocused(): Shorten lookups to LzInputTextSprite.prototype. Look at the srcElement of the last event to see if it was an instance of LzTextSprite - this happens when an text is in the same area as an inputtext. If this is the case, focus the inputtext and avoid hiding the shown inputtext.
Tests: Testcase from LPP-8219 and compose window in webtop mail allows the to: field to be selected in the area that says 'Drag a contact or type for autosuggest'.
.......
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-13937,13948-13952,13954-13968,13970,13972-13980,13982-13985,13987-14002,14026
+ /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-13937,13948-13952,13954-13968,13970,13972-13980,13982-13985,13987-14002,14026,14052
Modified: openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-04 10:30:05 UTC (rev 14063)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js 2009-06-04 19:17:13 UTC (rev 14064)
@@ -248,27 +248,39 @@
}
LzInputTextSprite.prototype.__hideIfNotFocused = function(eventname, target) {
- if (LzInputTextSprite.prototype.__lastshown == null) return;
- if (LzSprite.prototype.quirks.fix_ie_clickable) {
+ var lzinppr = LzInputTextSprite.prototype;
+ if (lzinppr.__lastshown == null) return;
+ var quirks = LzSprite.prototype.quirks;
+ if (quirks.fix_ie_clickable) {
if (eventname == 'onmousemove') {
// track mouse position for inputtext when global clickable is false
- if (LzInputTextSprite.prototype.__globalclickable == false && LzInputTextSprite.prototype.__focusedSprite && target) {
- if (target.owner != LzInputTextSprite.prototype.__focusedSprite) {
- LzInputTextSprite.prototype.__setglobalclickable(true);
+ if (lzinppr.__globalclickable == false && lzinppr.__focusedSprite && target) {
+ if (target.owner != lzinppr.__focusedSprite) {
+ lzinppr.__setglobalclickable(true);
} else {
- LzInputTextSprite.prototype.__setglobalclickable(false);
+ lzinppr.__setglobalclickable(false);
}
}
return;
- } else if (eventname != null && LzInputTextSprite.prototype.__globalclickable == true) {
- LzInputTextSprite.prototype.__setglobalclickable(false);
+ } else if (eventname != null && lzinppr.__globalclickable == true) {
+ lzinppr.__setglobalclickable(false);
}
+ if (quirks.textgrabsinputtextfocus) {
+ var s = window.event;
+ if (s && s.srcElement && s.srcElement.owner && s.srcElement.owner instanceof LzTextSprite) {
+ //Debug.write('text intercepting focus', eventname, s.owner instanceof LzTextSprite);
+ if (eventname == 'onmousedown') {
+ lzinppr.__lastshown.gotFocus();
+ }
+ return;
+ }
+ }
}
- if (LzInputTextSprite.prototype.__focusedSprite != LzInputTextSprite.prototype.__lastshown) {
- LzInputTextSprite.prototype.__lastshown.__hide();
+ if (lzinppr.__focusedSprite != lzinppr.__lastshown) {
+ lzinppr.__lastshown.__hide();
}
+}
-}
LzInputTextSprite.prototype.__setglobalclickable = function(c) {
if (! LzSprite.prototype.quirks.fix_ie_clickable) return;
if (c != LzInputTextSprite.prototype.__globalclickable) {
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-04 10:30:05 UTC (rev 14063)
+++ openlaszlo/branches/4.4/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-06-04 19:17:13 UTC (rev 14064)
@@ -497,6 +497,7 @@
,dom_breaks_focus: false
,inputtext_anonymous_div: false
,clipped_scrollbar_causes_display_turd: false
+ ,textgrabsinputtextfocus: false
}
LzSprite.prototype.capabilities = {
@@ -605,6 +606,8 @@
quirks['scrollbar_width'] = 16;
// CSS sprites conflict with ie_alpha_image_loader...
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;
} 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