Skip to content

[Shadow DOM] Allow selection from target encapsulated by a shadow root - #4720

Closed
mdgbayly wants to merge 1 commit into
tinymce:masterfrom
mdgbayly:mdgbayly/selection-shadow-root
Closed

mdgbayly wants to merge 1 commit into
tinymce:masterfrom
mdgbayly:mdgbayly/selection-shadow-root

Conversation

@mdgbayly

Copy link
Copy Markdown

Extracting ideas from PR #561 that was never merged, to begin adding support for Shadow DOM:

We're trying to get tinymce working in web components that utilize shadow DOM. Our initial usage of tinymce is for an inline editor with a simple toolbar.

My intent is to create a number of small PRs that progressively fix more issues required in order to make our use cases work, rather than one big blanket PR that makes all tinymce use cases support shadow DOM.

This PR fixes the selection so that if an editor is encapsulated by a shadow root, the current selection is obtained from the shadow root's selection rather than the window selection.

Also attempted to add some tests, (there were previously no tests for the Selection function.
Tried to glean what I could from reading other tinymce tests, but not sure if what I have come up with is particularly clean or standard for writing tinymce tests.

@mdgbayly

Copy link
Copy Markdown
Author

FYI I don't seem to be receiving the CLA email. I checked the email address in the commit and it is correct. Checked my spam folder and don't see it anywhere.

@mdgbayly

mdgbayly commented Jan 8, 2019

Copy link
Copy Markdown
Author

Closing as supersceded by #4737

@mdgbayly mdgbayly closed this Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant