Fix tinymce image selection issue in newer versions of Chrome

This commit is contained in:
Christopher Joe 2017-06-02 15:06:16 +12:00
parent 294df1320f
commit 4b9d5dceb8
3 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

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

View File

@ -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)) {
try {
selection.getSel().setBaseAndExtent(e, 0, e, 1);
} catch (error) {
selection.select(e);
}
}
if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) {