Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TextEditingDelta Support for the Web (#28527)
* Initial implementation of TextEditingDeltaState for the web * Capture composing region through compositionupdate and handle cases where there is an edit that occurs before the current cursor position * clean up unused code * clean up rest of logs * Make sure we initialize oldText in beforeInput * Clean up comments * more defaults * Add more comments * Move delta inferrence logic to TextEditingDeltaState * Add new listeners to rest of strategies * Fix existing tests * Fix tests * Add lastTextEditingDeltaState to test * fix tests * Add some preliminary tests for TextEditingDeltaState * Send as list to framework * Add composing region test * Address nits * Update tests * Try to fix tests * Prefer const with constant constructors * Clean up comments * Specify types * fix tests * Specify type annotations * batchDeltas -> deltas * Make eventData nullable so we dont compare with a 'null' string * Make TextEditingDeltaState mutable to avoid multiple copies * Fix analyzer * Fix test * Use safe browser api instead of directly accessing js_util * remove last prefix from editingDeltaState * Remove logs * fix merge * fix whitespace * revert composing changes * update comments * remove trailing whitespace * Add docs for TextEditingDeltaState * Normalize delta naming and use a copy instead of modifying function arguments * Update selection of delta in inferDeltaState instead of onChange * Fix tests, previously the selection was not set in inferDeltaState, now it is so the tests should reflect this change * Make a copy of delta instead of modifying function arguments * remove whitespace * Move some logic into inferDeltaState * whitespace * analyzer fix * Revert "analyzer fix" This reverts commit 786a528. * Revert "whitespace" This reverts commit 98fad47. * Revert "Move some logic into inferDeltaState" This reverts commit a600e9e. * pass _editingDeltaState instead of editingDeltaState to onChange for clarity * Add docs for beforeinput * Add docs for inferDeltaState * whitespace * Add more docs * update docs * update docs * Fix for insertion of a period following a double space within old text bounds * Fix accent insertion * clean up comments * Address comments for clarity aand regexp * Make composing and selection nullable * update docs * whitespace * address comments Co-authored-by: Renzo Olivares <roliv@google.com>
- Loading branch information