[Laszlo-dev] Fixing LPP-8257
Max Carlson
max at laszlosystems.com
Wed Jun 17 16:22:27 PDT 2009
I tracked down the change where inputtext_parents_cannot_contain_clip
was introduced, and it indicates the change was required for IE 6 and 7.
If the tests for that change pass, then go ahead and turn the quirk
off for the browsers that no longer need it. I'd recommend testing in
IE 6, 7 and 8. We no longer officially support IE 6, but we try to not
break anything, and inputtext focusing is pretty important :)
The change where this was added is:
Author: max
Date: 2007-05-23 19:24:17 -0700 (Wed, 23 May 2007)
New Revision: 5195
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/branches/legals/WEB-INF/lps/lfc/views/LzInputText.lzs
Log:
Change 20070523-maxcarlson-y by maxcarlson at plastik on 2007-05-23
15:13:27 PDT
in /Users/maxcarlson/openlaszlo/legals-clean
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Fix issues with inputtext in IE 6/7
New Features:
Bugs Fixed: LPP-3691 - issues with inputtext in ie6/7 in html example
Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.as - set capabilities.htmlinputtext to true for
LzInputText.lzs
LzSprite.js - set capabilities.htmlinputtext to true for
LzInputText.lzs. Add inputtext_parents_cannot_contain_clip quirk and
set it to true for IE. Update __findParents() to rely only on sprite
properties.
LzInputTextSprite.js - When inputtext_parents_cannot_contain_clip is
true: if shown, set clip=false on all parent sprites. When hidden, set
the parent back the way they were. select() now uses focus() with a
delayed call to select().
LzInputText.lzs - Disable focusing of disabled fields. setHTML() checks
capabilities.htmlinputtext before calling sprite.setHTML(), and warns
where unsupported.
Tests:
http://localhost:8080/legals-clean/examples/components/form_example.lzx?lzr=dhtml
in IE7 shows much better behavior on the second tab. Tabbing into
fields works, and the text never disappears when being edited.
Files:
M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
M WEB-INF/lps/lfc/views/LzInputText.lzs
promanik at laszlosystems.com wrote:
> Hi Max,
>
> Tucker discovered that turning off the IE-specific quirk,
> inputtext_parents_cannot_contain_clip, seems to fix the problem. I've
> been testing it in IE7/IE8 and it looks good. This quirk was introduced
> in r5195 (LPP-3691). Can you think of a reason why this quirk is still
> needed?
>
> To summarize the quirk,
>
> In LzInputTextSprite#__show:
>
> if (this.quirks['inputtext_parents_cannot_contain_clip']) {
> var sprites = this.__findParents('clip');
> var l = sprites.length;
> if (l > 1) {
> if (this._shownclipvals == null) {
> //if ($debug) Debug.warn('IE may not show the contents
> of inputtexts whose intermediate parents have clipping on. The
> following parents have clip set:', sprites);
> // store old values
> this._shownclipvals = [];
> this._shownclippedsprites = sprites;
> for (var n = 0; n < l; n++) {
> var v = sprites[n];
> this._shownclipvals[n] =
> v.__LZclickcontainerdiv.style.clip;
> v.__LZclickcontainerdiv.style.clip = 'rect(auto auto
> auto auto)';
> }
> }
> }
> }
>
> In LzInputTextSprite#__hide:
>
> if (this.quirks['inputtext_parents_cannot_contain_clip']) {
> if (this._shownclipvals != null) {
> // restore old values
> for (var n = 0; n < this._shownclipvals.length; n++) {
> var v = this._shownclippedsprites[n];
> v.__LZclickcontainerdiv.style.clip =
> this._shownclipvals[n];
> }
> this._shownclipvals = null;
> this._shownclippedsprites = null;
> }
> }
>
>
> Thanks!
>
> Phil
>
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list