[BUGFIX] Fix incorrect position of RTE context menu 80/50780/3
authorClaus Due <claus@namelesscoder.net>
Fri, 25 Nov 2016 13:16:53 +0000 (14:16 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 1 Dec 2016 10:43:57 +0000 (11:43 +0100)
Fixes the position of the context menu to the cursor,
preventing it from being displayed outside of the
RTE frame.

Change-Id: Ib1bf23da6463beb32c49a9272bf225e73c4bc9f6
Resolves: #78001
Releases: 7.6
Reviewed-on: https://review.typo3.org/50780
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Manuel Glauser <mail@manuelglauser.ch>
Tested-by: Manuel Glauser <mail@manuelglauser.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/ContextMenu.js

index dce5904..9d0ed13 100644 (file)
@@ -94,8 +94,8 @@ define(['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
                                y: 0
                        };
                        var onMouseUpdate = function(e) {
-                               self.mousePosition.x = e.pageX;
-                               self.mousePosition.y = e.pageY;
+                               self.mousePosition.x = e.clientX;
+                               self.mousePosition.y = e.clientY;
                        };
                        Event.on(this.editor.document.documentElement, 'mousemove', onMouseUpdate);
                        Event.on(this.editor.document.documentElement, 'mouseenter', onMouseUpdate);