mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix tinymce image selection issue in newer versions of Chrome
This commit is contained in:
parent
294df1320f
commit
4b9d5dceb8
2
thirdparty/tinymce/tiny_mce.js
vendored
2
thirdparty/tinymce/tiny_mce.js
vendored
File diff suppressed because one or more lines are too long
2
thirdparty/tinymce/tiny_mce_gzip.php
vendored
2
thirdparty/tinymce/tiny_mce_gzip.php
vendored
@ -19,7 +19,7 @@ if (TinyMCE_Compressor::getParam("js")) {
|
|||||||
// Default settings
|
// Default settings
|
||||||
$tinyMCECompressor = new TinyMCE_Compressor(array(
|
$tinyMCECompressor = new TinyMCE_Compressor(array(
|
||||||
// CUSTOM SilverStripe
|
// CUSTOM SilverStripe
|
||||||
'cache_dir' => TEMP_FOLDER
|
'cache_dir' => TEMP_FOLDER.'/tinymce-cache'
|
||||||
// CUSTOM END
|
// CUSTOM END
|
||||||
));
|
));
|
||||||
|
|
||||||
|
4
thirdparty/tinymce/tiny_mce_src.js
vendored
4
thirdparty/tinymce/tiny_mce_src.js
vendored
@ -1317,7 +1317,11 @@ tinymce.util.Quirks = function(editor) {
|
|||||||
// WebKit can't even do simple things like selecting an image
|
// WebKit can't even do simple things like selecting an image
|
||||||
// Needs tobe the setBaseAndExtend or it will fail to select floated images
|
// Needs tobe the setBaseAndExtend or it will fail to select floated images
|
||||||
if (/^(IMG|HR)$/.test(e.nodeName)) {
|
if (/^(IMG|HR)$/.test(e.nodeName)) {
|
||||||
|
try {
|
||||||
selection.getSel().setBaseAndExtent(e, 0, e, 1);
|
selection.getSel().setBaseAndExtent(e, 0, e, 1);
|
||||||
|
} catch (error) {
|
||||||
|
selection.select(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) {
|
if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user