Removed workaround for old Webkit bug in the TinyMCE editor for selec… #9540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…tions of images and hr elements, because this workaround now causes problems in Google Chrome version 58.
Description
This PR attempts to solve a new bug which popped up by upgrading Google Chrome to version 58.
In the TinyMCE editor, we can no longer select images (or widgets, which are represented by an image), so we can no longer edit images (or widgets) using the TinyMCE editor.
See #9518 for more detailed info with links to a bunch of external sources.
Fixed Issues (if relevant)
Manual testing scenarios
Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.
Contribution checklist
Discussion
I only briefly tested these changes, only on Chrome 58 and Safari 10.1, so it would be highly appreciated if someone else can test all browsers which Magento supports and see if this doesn't break any other browser.
I applied the changes to all tiny_mce scripts I could find, although I think only the
tiny_mce_src.js
one is used in the backend of Magento. But since you bundle all the other scripts in Magento, It could be possible that someone is using another script, so I assumed this should be fixed in all the tiny_mce scripts.Also: the minified tiny_mce scripts were manually edited, I don't know the command which was being used to generate the minified scripts, so please double check that my manual edits are ok.
Since this bug will probably popup with a lot of shopowners in the near future, this fix should get a bit of a higher priority and should also get backported to Magento versions 2.1 and 2.0 as soon as possible.
If this PR is accepted, I can create a backport for version 2.1, but not sure how backporting to 2.0 is supposed to work?