|
|
|
[
Permlink
| « Hide
]
Benjamin Shine - 05/Jul/07 04:06 PM
This bug is in legals.
On TOT legals the behavior isn't as bad as indicated. The combobox can still be used after the opacity of the parent view has been set. However, the mouse interaction with the control is pretty bad. I found that if I click on the view and then try and click the combobox I was usually able to get focus on the combobox.
If the other reported issues with IE/dhtml are fixed, my guess is that this issue will be fixed as well. This is present in TOT legals as of r5732.
Simplified testcase:
<canvas id="maincanvas" width="100%" height="100%"> <button text="click me" opacity="1"/> </canvas> (4.0 branch (4.0.3) build r5718)
IE6-swf OK IE6-dhtml OK IE7-swf OK IE7-dhtml Broken This is a simpler testcase that shows the issue - it's an IE7-specific rendering bug:
<canvas id="maincanvas" width="100%" height="100%" bgcolor="white"> <view width="100" height="100" opacity=".5" bgcolor="red"> <text>Some text</text> <view resource="clickregion.swf"/> </view> </canvas> If text and an image share the same screen area with a background color, the text picks up the color of the nearest view with a background color (and no opacity) - in this case the canvas. A workaround is to set all parent views with a bgcolor to have opacity 1 and set the background color of the page to something with high contrast, e.g.: <canvas id="maincanvas" width="100%" height="100%" bgcolor="black"> <view width="100" height="100" opacity=".5" bgcolor="red"> <text>Some text</text> <view resource="clickregion.swf"/> </view> </canvas> Testcase out for review only handles cases where opacity == 1. This takes care of the common case where a container's opacity is animated to 1 - fixes the details panel the calendar app.
Author: max
Date: 2007-07-23 17:07:34 -0700 (Mon, 23 Jul 2007) New Revision: 5757 Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js Log: Change 20070723-maxcarlson-r by maxcarlson@plastik on 2007-07-23 13:14:59 PDT in /Users/maxcarlson/openlaszlo/legals-checkin for http://svn.openlaszlo.org/openlaszlo/branches/legals Summary: Turn off opacity for opacity == 1, turn off alphaimageloader in ie7 New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: jcrowley Doc Reviewer: (pending) Documentation: Release Notes: Details: LzSprite.js - Separate ie_opacity into its own quirk. Turn off ie_alpha_image_loader and turn on invisible_parent_image_sizing_fix quirks for ie 7. setOpacity(0) hides the div, and setOpacity(1) removes the opacity css property. Fix __findParents for cases where the parent sprite is null. Tests: Fixes initial testcase in Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js =================================================================== --- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-07-23 23:32:23 UTC (rev 5756) +++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-07-24 00:07:34 UTC (rev 5757) @@ -207,6 +207,7 @@ ,minimize_opacity_changes: false ,set_height_for_multiline_inputtext: false ,ie_offset_position_by_2: false + ,ie_opacity: false } LzSprite.prototype.capabilities = { @@ -234,8 +235,14 @@ //this.quirks['fix_clickable'] = true; if (Lz.__BrowserDetect.isIE) { // Provide IE PNG/opacity support - this.quirks['ie_alpha_image_loader'] = true; + if (Lz.__BrowserDetect.version < 7) { + this.quirks['ie_alpha_image_loader'] = true; + } else { + this.quirks['invisible_parent_image_sizing_fix'] = true; + } + this.quirks['ie_opacity'] = true; + // IE DOM leak prevention this.quirks['ie_leak_prevention'] = true; @@ -782,10 +789,26 @@ o = parseInt(o * 100) / 100; if (o != this._opacity) { this._opacity = o; - if (this.quirks.ie_alpha_image_loader) { - this.__LZdiv.style.filter = "alpha(opacity=" + parseInt(o * 100) + ")"; + if (o == 0) { + this.__LZdiv.style.display = 'none'; + this._opacitywas0 = true; + } else if (this._opacitywas0) { + this._opacitywas0 = false; + this.__LZdiv.style.display = 'block'; + } + + if (this.quirks.ie_opacity) { + if (o == 1) { + this.__LZdiv.style.filter = ""; + } else { + this.__LZdiv.style.filter = "alpha(opacity=" + parseInt(o * 100) + ")"; + } } else { - this.__LZdiv.style.opacity = o; + if (o == 1) { + this.__LZdiv.style.opacity = ""; + } else { + this.__LZdiv.style.opacity = o; + } } } } @@ -875,6 +898,7 @@ if (sprite[prop] != null) out.push(sprite); do { sprite = sprite.__parent; + if (! sprite) return out; if (sprite[prop] != null) out.push(sprite); //alert(sprite); } while (sprite != LzSprite.__rootSprite) _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins (legals build r5764)
IE7, dhtml behaves the same as IE6. Close for legals. Ben - Please merge this change in the 4.0 branch and mark it resolved fixed. Needs to be tested in the 4.0 branch.
(4.0 branch (4.0.4) build on labs)
Fixed in 4.0 branch. |
||||||||||||||||||||||||||||||||||||||||||||||||||||