Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 9489)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
@@ -1243,7 +1243,10 @@
this.mon(Ext.get(this.document.documentElement), (Ext.isIE || Ext.isWebKit) ? 'keydown' : 'keypress', this.onAnyKey, this);
this.mon(Ext.get(this.document.documentElement), 'mouseup', this.onMouse, this);
this.mon(Ext.get(this.document.documentElement), 'click', this.onMouse, this);
- this.mon(Ext.get(this.document.documentElement), Ext.isWebKit ? 'dragend' : 'drop', this.onDrop, this);
+ this.mon(Ext.get(this.document.documentElement), 'drop', this.onDrop, this);
+ if (Ext.isWebKit) {
+ this.mon(Ext.get(this.document.body), 'dragend', this.onDrop, this);
+ }
},
/*
* Handler for other key events
Index: typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php
===================================================================
--- typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php (révision 9489)
+++ typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php (copie de travail)
@@ -261,7 +261,7 @@
* @return string the body tag additions
*/
public function getBodyTagAdditions() {
- return '';
+ return 'onload="initEventListeners();"';
}
/**
@@ -449,9 +449,10 @@
$JScode='
var plugin = window.parent.RTEarea["' . $editorNo . '"].editor.getPlugin("TYPO3Image");
var HTMLArea = window.parent.HTMLArea;
- var Ext = window.parent.Ext;
- if (Ext.isWebKit) {
- plugin.dialog.mon(Ext.get(plugin.dialog.getComponent("content-iframe").getEl().dom.contentWindow.document.documentElement), "dragend", plugin.onDrop, plugin, {single: true});
+ function initEventListeners() {
+ if (Ext.isWebKit) {
+ Ext.EventManager.addListener(window.document.body, "dragend", plugin.onDrop, plugin, { single: true });
+ }
}
function jumpToUrl(URL,anchor) {
var add_act = URL.indexOf("act=")==-1 ? "&act='.$act.'" : "";