summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js')
-rw-r--r--program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
index 649264141..a2c1866ba 100644
--- a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
@@ -1,5 +1,5 @@
/**
- * $Id: editor_plugin_src.js 755 2008-03-29 19:14:42Z spocke $
+ * $Id: editor_plugin_src.js 848 2008-05-15 11:54:40Z spocke $
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
@@ -18,7 +18,7 @@
ed.onContextMenu.add(function(ed, e) {
if (!e.ctrlKey) {
t._getMenu(ed).showMenu(e.clientX, e.clientY);
- Event.add(document, 'click', hide);
+ Event.add(ed.getDoc(), 'click', hide);
Event.cancel(e);
}
});
@@ -27,7 +27,7 @@
if (t._menu) {
t._menu.removeAll();
t._menu.destroy();
- Event.remove(document, 'click', hide);
+ Event.remove(ed.getDoc(), 'click', hide);
}
};
@@ -57,10 +57,8 @@
p2 = DOM.getPos(ed.getContainer());
m = ed.controlManager.createDropMenu('contextmenu', {
- offset_x : p1.x,
- offset_y : p1.y,
-/* vp_offset_x : p2.x,
- vp_offset_y : p2.y,*/
+ offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0),
+ offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0),
constrain : 1
});