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