History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4242
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Robert Yeager
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Controls go to disabled state when outer view opacity set in R5588 IE7 DHTML

Created: 05/Jul/07 12:03 PM   Updated: 25/Jul/07 02:57 PM
Component/s: Components - all
Affects Version/s: Legals, 4.0.3
Fix Version/s: Legals, 4.0.3

Time Tracking:
Not Specified

Severity: Critical
Runtime: DHTML
Flags: External
Fix in hand: False


 Description  « Hide
The following code demonstrates that child controls of a view get changed into the disabled state, when the outer view's opacity is set in R5588 IE7 DHTML:

<canvas id="maincanvas" width="100%" height="100%" validate="false" debug="false" proxied="false" bgcolor="0xEFF1E8">
<debug x="650" y="200" width="800" height="400" fontsize="12"/>
<view id="dv" x="0" y="0" width="200" height="200" bgcolor="red">
<button text="click me">
<handler name="onclick">
parent.setAttribute("opacity", 1.0);
</handler>
</button>

<combobox y="50">
<textlistitem>1</textlistitem>
<textlistitem>2</textlistitem>
<textlistitem>3</textlistitem>
</combobox>
</view>
</canvas>


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benjamin Shine - 05/Jul/07 04:06 PM
This bug is in legals.

Philip Romanik - 06/Jul/07 05:36 AM
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.

Benjamin Shine - 20/Jul/07 03:26 PM
This is present in TOT legals as of r5732.

Max Carlson - 20/Jul/07 03:44 PM
Simplified testcase:

<canvas id="maincanvas" width="100%" height="100%">
<button text="click me" opacity="1"/>
</canvas>

Mamye Kratt - 20/Jul/07 04:38 PM
(4.0 branch (4.0.3) build r5718)
IE6-swf OK
IE6-dhtml OK
IE7-swf OK
IE7-dhtml Broken

Max Carlson - 23/Jul/07 10:26 AM
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>

Max Carlson - 23/Jul/07 02:23 PM
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.

Max Carlson - 24/Jul/07 12:00 PM
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: LPP-4242 - Controls go to disabled state when outer view opacity set in R5588 IE7 DHTML

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 LPP-4242. Also fixes display bug in calendar edit panel (select an event and click the (i) button).



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

Mamye Kratt - 24/Jul/07 03:06 PM
(legals build r5764)
IE7, dhtml behaves the same as IE6. Close for legals.

Mamye Kratt - 24/Jul/07 03:58 PM
Ben - Please merge this change in the 4.0 branch and mark it resolved fixed. Needs to be tested in the 4.0 branch.

Mamye Kratt - 25/Jul/07 02:57 PM
reopen to close in 4.0 branch.

Mamye Kratt - 25/Jul/07 02:57 PM
(4.0 branch (4.0.4) build on labs)
Fixed in 4.0 branch.