Add back early return in setOffsets which was removed in 16.5.0 #14095
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.
The scenario is that we have a TinyMCE editor (which uses an iframe, which the relevant code changes in #13650 made changes related to), and this editor is shown in every row in a list component.
The editor supports pasting to add more rows, and when pasting a lot of items (100+), we get "Object expected", due to getSelection not being present on the Window object. Seems strange obviously, but there could be some security issue with Edge or something? Not sure.
Not sure how to test this so didn't add any unit tests for it. The early return existed pre 16.5.0, this PR adds it back.