-
Notifications
You must be signed in to change notification settings - Fork 30.2k
[Web] Refactor TextEditingDelta implementation #105243
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
The TextEditingDelta implementation on web currently continually updates an
editingDeltaStateduring the process of text-input (beforeInput, onInput, compositionupdate), until we have arrived at a finaleditingDeltaState. Having it spread across many handlers can make it difficult to make updates to theDefaultTextEditingStrategywithout breaking TextEditingDeltas. An example of this is flutter/engine#33590 which adds composing region tracking, but broke TextEditingDeltas at first (later resolved).Proposal:
Use the lastEditingState and the newEditingState to determine the state of a TextEditingDelta, and centralize the logic into
inferDeltaState.