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
This commit is contained in:
Andrew Ozz 2012-08-22 01:47:53 +00:00
parent 9bd7b4811b
commit d2f6b4559f
2 changed files with 7 additions and 3 deletions

View File

@ -317,6 +317,7 @@ final class _WP_Editors {
'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 File

@ -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;