New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IME+Android] The MutationObserver
should not break text nodes.
#16300
base: ck/epic/ime-typing
Are you sure you want to change the base?
Conversation
…ges, not as a normal flow in IME. Composed text on Android should be inserted to the model only after it is available in the DOM (so on beforeinput is too early). So no mutations other by those made by IME.
…er avoiding programmatic DOM changes while composing.
…osition mutations on composition end.
… of mutations vs composition elements.
…the model to avoid reverting DOM changes and the re-applying them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review.
* by default in all editor instances (attached by {@link module:engine/view/view~View}). | ||
* | ||
* @eventName module:engine/view/document~Document#mutations | ||
* @param data Event data containing detailed information about the event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data
is not available below.
export type MutationsEventData = { | ||
mutations: Array<MutationData>; | ||
}; | ||
|
||
/** | ||
* A single entry in {@link ~MutationsEventData} mutations array. | ||
*/ | ||
export type MutationData = { | ||
type: ChangeType; | ||
node: ViewNode; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing field description.
// @if CK_DEBUG_TYPING // console.info( '%c[Renderer]%c Rendering aborted while isComposing', | ||
// @if CK_DEBUG_TYPING // 'color: green;font-weight: bold', '' | ||
// @if CK_DEBUG_TYPING // console.info( '%c[Renderer]%c Rendering aborted while isComposing.', | ||
// @if CK_DEBUG_TYPING // 'color: green;font-weight: bold', 'font-style: italic' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// @if CK_DEBUG_TYPING // 'color: green;font-weight: bold', 'font-style: italic' | |
// @if CK_DEBUG_TYPING // 'color: green; font-weight: bold', 'font-style: italic' |
And below.
// At this point we have "dirty DOM" (changed) and de-synched view (which has not been changed). | ||
// In order to "reset DOM" we render the view again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be adjusted.
Suggested merge commit message (convention)
Fix (engine, typing): Typing on Android should avoid modifying DOM while composing. Closes #13994. Closes #14707. Closes #13850.
Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.