Skip to content
Browse files

Disable the (fake) image resizing in WebKit and Opera in TinyMCE 3.5.…

…6, fix dragging image with caption in Firefox, see #21173

git-svn-id: http://core.svn.wordpress.org/trunk@21576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 9bd7b48 commit d2f6b4559f543fc6d680c2be2f279d7268b15c25 Andrew Ozz committed
View
1 wp-includes/class-wp-editor.php
@@ -317,6 +317,7 @@ public static function editor_settings($editor_id, $set) {
'paste_remove_spans' => true,
'paste_strip_class_attributes' => 'all',
'paste_text_use_dialog' => true,
+ 'webkit_fake_resize' => false,
'spellchecker_rpc_url' => self::$baseurl . '/plugins/spellchecker/rpc.php',
'extended_valid_elements' => 'article[*],aside[*],audio[*],canvas[*],command[*],datalist[*],details[*],embed[*],figcaption[*],figure[*],footer[*],header[*],hgroup[*],keygen[*],mark[*],meter[*],nav[*],output[*],progress[*],section[*],source[*],summary,time[*],video[*],wbr',
'wpeditimage_disable_captions' => $no_captions,
View
9 wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
@@ -14,11 +14,14 @@
ed.addCommand('WP_EditImage', t._editImage);
ed.onInit.add(function(ed) {
- ed.dom.events.add(ed.getBody(), 'dragstart', function(e) {
+ ed.dom.events.add(ed.getBody(), 'mousedown', function(e) {
var parent;
if ( e.target.nodeName == 'IMG' && ( parent = ed.dom.getParent(e.target, 'div.mceTemp') ) ) {
- ed.selection.select(parent);
+ if ( tinymce.isGecko )
+ ed.selection.select(parent);
+ else if ( tinymce.isWebKit )
+ ed.dom.events.cancel(e);
}
});
@@ -44,7 +47,7 @@
});
});
- // resize the caption <dl> when the image is soft-resized by the user (only possible in Firefox and IE)
+ // resize the caption <dl> when the image is soft-resized by the user
ed.onMouseUp.add(function(ed, e) {
if ( tinymce.isWebKit || tinymce.isOpera )
return;

0 comments on commit d2f6b45

Please sign in to comment.
Something went wrong with that request. Please try again.