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

Key: LPP-4661
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: Pablo Kang
Votes: 0
Watchers: 2
Operations

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

View with stretches="both" does not get onclick

Created: 05/Sep/07 03:35 PM   Updated: 31/Jan/08 02:41 PM
Component/s: Laszlo Foundation Classes (LFC)
Affects Version/s: 4.0.3
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Major
Fixed in Change#: 7,933
Runtime: N/A
Fix in hand: False


 Description  « Hide
The blueview doesn't get an onclick event. If you remove stretches="both" it does.

Test case:
<canvas debug="true">
    
    <view id="redview" x="20" y="20" width="200" height="200" bgcolor="red">
        <view id="blueview" width="100" height="100" bgcolor="blue" stretches="both">
            <!-- Blue view doesn't get onclick -->
            <handler name="onclick">
                Debug.write('click blue');
            </handler>
        </view>
        <handler name="onclick">
            Debug.write('click red');
        </handler>
    </view>

</canvas>


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 07/Sep/07 05:40 AM
Using x or y for stretches also exhibits the bug. Using a bogus value does not.

P T Withington - 07/Sep/07 05:42 AM
stretches="none" also works correctly

P T Withington - 07/Sep/07 05:46 AM
Hey Mr. Sprite: This ring any bells?

P T Withington - 07/Sep/07 05:49 AM
SWF-only. DHTML works as expected.

P T Withington - 07/Sep/07 05:57 AM
The scale of the button clip on the stretched view is 0. I suspect the sprite is forgetting to scale the button clip when it scales the view clip.

P T Withington - 07/Sep/07 01:42 PM
r6402 | ptw | 2007-09-07 16:40:55 -0400 (Fri, 07 Sep 2007) | 20 lines
Changed paths:
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as

Change 20070907-ptw-r by ptw@dueling-banjos.local on 2007-09-07 15:16:36 EDT
    in /Users/ptw/OpenLaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Corner case for stretches with no resource

Bugs Fixed:
LPP-4661 'View with stretches="both" does not get onclick'

Technical Reviewer: max (Message-ID: <46E1B428.4060901@openlaszlo.org>)
QA Reviewer: pkang (pending)

Details:
    If there is no resource the default dimension is 100 for unscaling
    the button

Tests:
    Test case from bug works correctly.


Mamye Kratt - 12/Sep/07 02:59 PM
(wafflecone branch build r6430)

Ran testfile with and without stretch being set to both, in shtml and swf successfully.

Robert Kotenko - 12/Oct/07 10:01 AM
The release notes for 4.0.5 say that this issue has been resolved for it. This is not correct. Stretches still breaks onclick. I am testing using the following code:

<canvas width="700" height="300">
      <font src="helmetb.ttf" name="helmet"/>
  <view stretches="both" height="100" bgcolor="blue" width="500"
        onclick="Debug.write('yo')">
    
  </view>
</canvas>


I am running Tomcat 4.0.24 locally on Windows XP

Shall I open a new issue for this?

Max Carlson - 12/Oct/07 09:03 PM
Please try again with the new testcase...

Amy Muntz - 15/Oct/07 10:40 AM
please verify and resolve if fixed.

Pablo Kang - 18/Oct/07 01:08 PM
This does not work with the second test case.

P T Withington - 31/Jan/08 04:28 AM
r7933 | ptw | 2008-01-31 07:25:53 -0500 (Thu, 31 Jan 2008) | 34 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as

Change 20080125-ptw-x by ptw@dueling-banjos.local on 2008-01-25 15:41:02 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Yet another try at solving stretches vs. clickable

Bugs Fixed:
LPP-5372 'Mouse events available for first 100 pixels on a stretched view'

Technical Reviewer: hqm (message://<8c61fad60801301500w262fa19aq92cfcb6bd08011c@mail.gmail.com>)
QA Reviewer: pkang (pending)

Details:
    LzMakeLoadSprite: DON'T call updateResourceSize (which apparently
    papered over bugs in LzSprite, and now does the wrong thing).
    Don't inline parts of the code from LzSprite#set{Width,Height},
    which leads to skew; call them.

    LzSprite: Add an informative debugging name. Added a bunch of
    devnotes to document the secret inner workings of the Flash player
    that Adam apparently thougth were patently obvious. Initialize
    resource{width,height}. Make sure you have a clip to scale before
    you try to scale it. Correct computation of scale for stretches
    when there is no resource supplied. Correct the computation for
    scaling of button (clickable) to compensate for the parent clip
    being stretched. Simplify computation of updateResourceSize.

    LzDebug: Make the movieclip debug printer more informative. Print
    _width and _height of movieclip when inpsecting.

Tests:
    Test cases from LPP-5372, 4661 (original and one in comments), 3726


Mamye Kratt - 31/Jan/08 02:41 PM
(trunk 4 local build r7937)
Both test files run successfully in swf and dhtml.