mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6986 from open-sausages/pulls/3.0/but-its-so-tinymce
Fix tinymce image selection issue in newer versions of Chrome
This commit is contained in:
commit
058ba813e6
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
8
thirdparty/tinymce/tiny_mce_gzip.php
vendored
8
thirdparty/tinymce/tiny_mce_gzip.php
vendored
@ -16,10 +16,14 @@ require_once $frameworkPath . '/core/Constants.php';
|
||||
|
||||
// Handle incoming request if it's a script call
|
||||
if (TinyMCE_Compressor::getParam("js")) {
|
||||
// Default settings
|
||||
$tempFolder = TEMP_FOLDER . '/tinymce-cache';
|
||||
if (!file_exists($tempFolder)) {
|
||||
mkdir($tempFolder);
|
||||
}
|
||||
// Default settings
|
||||
$tinyMCECompressor = new TinyMCE_Compressor(array(
|
||||
// CUSTOM SilverStripe
|
||||
'cache_dir' => TEMP_FOLDER
|
||||
'cache_dir' => $tempFolder
|
||||
// CUSTOM END
|
||||
));
|
||||
|
||||
|
6
thirdparty/tinymce/tiny_mce_src.js
vendored
6
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
|
||||
// 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
Block a user