[TYPO3-core] RFC: #6955: fileadmin contextual menu doesn't popup well

Helmut Hummel typo3 at jhpc.de
Sun Dec 16 18:41:44 CET 2007


Hey Benjamin,

Benjamin Mack schrieb:
> 
> Problem:
> in latest trunk (v2834, DON'T KNOW IN EARLIER) the right-click
> contextual menu in the tree is displaced and non selectable
> Solution:
> This is a prototype related change since I extended the Position object
> back then which is now deprecated and does not work anymore somehow. So
> I took the functionality to our clickmenu.js and extended the window
> object instead.

Looking in the prototypes Position Object, I saw (as you already
mentioned), that it's deprecated and Element object should be used
instead (Strange, that it works sometimes and sometimes not, but ok no
need to track this bug...).

Digging a little bit further, I found

document.viewport.getScrollOffsets();

doing exactly the same, what your extended window object does (even the
same code).

Same thing with the windows.getDimensions function. The prototypes

document.viewport.getDimensions();

does exactly the same as your window.getDimensions() function (not the
same but very similar code in this case).

Since we are already using prototype, there's no need to have dublicate
code here (see attached patch).

I tested this with FF2, IE6 and Safari 3 (Windows).

What do you think?

-- 
lib.salutation = TEXT
lib.salutation.value = Kind regards, Helmut
lib.salutation.lang.de = Viele Grüße, Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6955_cleanup.diff
Type: text/x-patch
Size: 2025 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071216/77f5c9e0/attachment.bin 


More information about the TYPO3-team-core mailing list