[Laszlo-dev] For Review: Change 20090302-bargull-uSw Summary: some more tweaks for dhtml contextmenu
Max Carlson
max at openlaszlo.org
Mon Mar 2 21:24:17 PST 2009
This change fixes context-menu right-clicks in IE 6 and 7 dhtml. That
said, there seems to be some code duplication when determining the
cursor position in __showContextMenu() and __sendMouseMove() - why not
refactor to a separate, shared method that updates LzMouseKernel.__x/y?
Also, please add a comment in the code that references
http://www.quirksmode.org/js/events_properties.html#position.
Otherwise, approved!
André Bargull wrote:
> Change 20090302-bargull-uSw by bargull at dell--p4--2-53 on 2009-03-02
> 13:37:27
> in /home/Admin/src/svn/openlaszlo/trunk
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: some more tweaks for dhtml contextmenu
>
> New Features:
>
> Bugs Fixed: LPP-7661
>
> Technical Reviewer: max
> QA Reviewer: promanik
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> IE doesn't implement pageX/pageY, only clientX/clientY. In order to get
> the proper absolute x/y-values, scrollLeft/scrollTop needs to be added
> (see http://www.quirksmode.org/js/events_properties.html#position).
> And I shouldn't try to be too smart in __showContextMenu() when using ||
> for short-circuit ops: Some browsers implement both pageX/pageY and
> clientX/clientY, so that code did effectively a binary or.
> And "owner" property is not required (needed for LPP-7823 dhtml/IE). And
> return from loop when elem is `null` which may happen for invalid
> positions. And finally, also check tagName, this could be necessary
> because "owner" is no longer required.
>
>
> Tests:
> IE pageX/pageY fix:
> - recompile developer console for dhtml
> - right click on dev console in dhtml/IE, note that contextmenu appears
> at proper position
>
> Files:
> M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20090302-bargull-uSw.tar
>
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list