It's the call to oninit="this.showBuiltInItems()"  that seems to be nuking
it.

I'll take a look at why this is happening.

On Mon, Aug 31, 2009 at 6:00 PM, André Bargull <[email protected]>wrote:

> Your test case works for me, too. But this one doesn't work:
> ---
> <canvas debug="true">
>  <view width="200" height="200" bgcolor="0xff0000">
>    <contextmenu name="cm" oninit="this.showBuiltInItems()"
> onmenuopen="Debug.write('opened menu')" >
>      <contextmenuitem onselect="Debug.write('selected menuitem')"
> caption="hello world"/>
>    </contextmenu>
>    <handler name="onmousedown">
>      Debug.debug("view onmousedown");
>    </handler>
>    <handler name="onmouseup">
>      Debug.debug("view onmouseup");
>    </handler>
>    <handler name="onclick">
>      Debug.debug("view onclick");
>    </handler>
>  </view>
>  <handler name="onmousedown" reference="lz.GlobalMouse">
>    Debug.debug("global onmousedown");
>  </handler>
>  <handler name="onmouseup" reference="lz.GlobalMouse">
>    Debug.debug("global onmouseup");
>  </handler>
> </canvas>
> ---
>
>
> On 8/31/2009 11:42 PM, Henry Minsky wrote:
>
>> Hmm. Firefox 3.5.2 (Win) works for me.
>>
>> With test case of
>>
>> <canvas debug="true" height="100%">
>>  <handler name="oninit">
>>
>>    canvas.setDefaultContextMenu(null);
>>  </handler>
>>
>>  <view width="200" height="200" bgcolor="0xff0000">
>>    <contextmenu name="cm" onmenuopen="Debug.write('opened menu')" >
>>      <contextmenuitem caption="hello world"/>
>>    </contextmenu>
>>  </view>
>> </canvas>
>>
>> I'm at r14631 in trunk. Maybe try a clean build?
>>
>>
>>
>> I see the "hello world" menu when I mouse right over the red view.
>>
>> Mousing right on the Canvas shows the default browser menu.
>>
>>
>>
>> On Mon, Aug 31, 2009 at 5:32 PM, André Bargull <[email protected]<mailto:
>> [email protected]>> wrote:
>>
>>    I would like to test that changeset, but context-menus don't show up
>>    at all* under Firefox3.5 (Win) with tr...@14635, with and without
>>    your change. So I'm a bit lost here... :-)
>>
>>
>>    * The global context-menu works, it also works if I open the global
>>    context-menu and then right-click on the red view while the global
>>    context-menu is still open. But only right clicking on the red view
>>    doesn't bring up the context-menu.
>>
>>
>>    On 8/31/2009 7:09 PM, Henry Minsky wrote:
>>
>>        Change 20090831-hqm-N by [email protected] on 2009-08-31
>>        13:01:15 EDT
>>           in /Users/hqm/openlaszlo/trunk-clean
>>           for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>>        Summary: (DHTML) ignore spurious mouse events when user
>>        dismisses contextmenu
>>
>>        New Features:
>>
>>        Bugs Fixed: LPP-8218, LPP-8189
>>
>>        Technical Reviewer: max
>>        QA Reviewer: andre
>>        Doc Reviewer: (pending)
>>
>>        Documentation:
>>
>>        Release Notes:
>>
>>        Details:
>>
>>        Change to make behavior when menu is dismissed match SWF more
>>        closely.
>>
>>        + When the user wants to dismiss a context menu without
>>        selecting any
>>        items, they move the mouse outside of the menu and either
>>        release the
>>        button or click the button.  In either case, we do not want these
>>        mousedown,mouseup, and click events to be sent to whatever view
>> they
>>        happen to be over.
>>
>>        This change modifies LzMouseKernel#__sendEvent to check if the
>>        context
>>        menu is being hidden due to a mousedown, and if so, sets flags to
>>        ignore the next mouseup and onclick events.
>>
>>
>>        Tests:
>>
>>        [test case from LPP-8189]
>>        <canvas>
>>        <view width="200" height="200" bgcolor="0xff0000">
>>           <handler name="onmousedown">
>>               // Expected: Fires in swf8 and dhtml for left mouse click
>>               // Unexpected: Fires in dhtml for right mouse click
>>               Debug.write("onmousedown");
>>           </handler>
>>           <handler name="onmouseup">
>>               // Expected: Fires in swf8 and dhtml for left mouse click
>>               // Unexpected: Fires in dhtml for right mouse click
>>               Debug.write("onmouseup");
>>           </handler>
>>           <handler name="onclick">
>>               // Expected: Fires in swf8 and dhtml for left mouse click
>>               Debug.write("onclick");
>>           </handler>
>>        </view>
>>        </canvas>
>>
>>
>>        In DHTML, these two cases should print no mouse events to the
>>        debugger
>>
>>        [1] Move mouse over red view, click right to display context menu.
>>        Press left button over an item, and while holding, drag mouse out
>> of
>>        context menu, but still over the red view, and then release
>>        button to
>>        dismiss menu.
>>        No events should print to the debugger.
>>
>>        [1] Move mouse over red view, click right to display context menu.
>>        Move mouse out of context menu, but still over red view, and click
>>        left to dismiss menu.
>>        No events should print to the debugger.
>>
>>        Files:
>>        M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
>>
>>        Changeset:
>>        http://svn.openlaszlo.org/openlaszlo/patches/20090831-hqm-N.tar
>>
>>
>>
>>
>> --
>> Henry Minsky
>> Software Architect
>> [email protected] <mailto:[email protected]>
>>
>>
>>


-- 
Henry Minsky
Software Architect
[email protected]
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to