fix: The operation before hijacking the ownerdocument of the node #1235
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.
Closes #916
tinymce 编辑器是采用 iframe 的方式来作为编辑区域,源代码有大量的 ownerDocument 的判断,必须是 tinymce 的 iframe 的 document 才能保证一些代码的逻辑无误,
以下截图是回车滚动条移动的关键代码,ownerDocument 被劫持成 micro-app iframe 的 document ,所以导致位置计算错误。
以上仅仅作为一个例子。为了灵活扩展,这里新增了劫持方法前置拦截,更细粒度的处理元素的正确 ownerDocument