This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
TextEditingDelta Support for the Web #28527
Merged
Renzo-Olivares
merged 72 commits into
flutter:main
from
Renzo-Olivares:text_editing_deltas_web
Feb 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
86885dd
Initial implementation of TextEditingDeltaState for the web
Renzo-Olivares 9ef2c43
Capture composing region through compositionupdate and handle cases w…
Renzo-Olivares b93b043
clean up unused code
Renzo-Olivares d3201a1
clean up rest of logs
Renzo-Olivares 9f99a66
Make sure we initialize oldText in beforeInput
Renzo-Olivares 8d69317
Clean up comments
Renzo-Olivares 3ba145c
more defaults
Renzo-Olivares 728055a
Add more comments
Renzo-Olivares efbdf5b
Move delta inferrence logic to TextEditingDeltaState
Renzo-Olivares 1c330f3
Add new listeners to rest of strategies
Renzo-Olivares 0dd249a
Fix existing tests
Renzo-Olivares 37b757e
Fix tests
Renzo-Olivares fd1396f
Add lastTextEditingDeltaState to test
Renzo-Olivares cb6ef96
fix tests
Renzo-Olivares 4f610e0
Add some preliminary tests for TextEditingDeltaState
Renzo-Olivares f772bf1
Send as list to framework
Renzo-Olivares f6e4d32
Add composing region test
Renzo-Olivares 704d4f9
Address nits
Renzo-Olivares 577aa59
Update tests
Renzo-Olivares 0dcf1f2
Try to fix tests
Renzo-Olivares a2e5525
Prefer const with constant constructors
Renzo-Olivares 95fe97b
Clean up comments
Renzo-Olivares 5921215
Specify types
Renzo-Olivares a2a8b9d
fix tests
Renzo-Olivares 1fbab86
Specify type annotations
Renzo-Olivares 928f186
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
Renzo-Olivares 03d63c3
batchDeltas -> deltas
Renzo-Olivares 51eabc8
Make eventData nullable so we dont compare with a 'null' string
Renzo-Olivares 125580e
Make TextEditingDeltaState mutable to avoid multiple copies
Renzo-Olivares 26668cb
Fix analyzer
Renzo-Olivares 5a33dbf
Fix test
Renzo-Olivares e47a3ed
Use safe browser api instead of directly accessing js_util
Renzo-Olivares 04020c2
remove last prefix from editingDeltaState
Renzo-Olivares 13ca351
Remove logs
Renzo-Olivares 73c1411
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
Renzo-Olivares be578c3
fix merge
Renzo-Olivares 2df95b0
fix whitespace
Renzo-Olivares 5e2b294
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
Renzo-Olivares ac3407b
revert composing changes
Renzo-Olivares fa1d886
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
Renzo-Olivares 6ced401
update comments
Renzo-Olivares 15868f6
remove trailing whitespace
Renzo-Olivares 059fe74
Add docs for TextEditingDeltaState
Renzo-Olivares 26e676a
Normalize delta naming and use a copy instead of modifying function a…
Renzo-Olivares 9196226
Update selection of delta in inferDeltaState instead of onChange
Renzo-Olivares 38bc244
Fix tests, previously the selection was not set in inferDeltaState, n…
Renzo-Olivares cc0bb16
Make a copy of delta instead of modifying function arguments
Renzo-Olivares b7a91da
remove whitespace
Renzo-Olivares a600e9e
Move some logic into inferDeltaState
Renzo-Olivares 98fad47
whitespace
Renzo-Olivares 786a528
analyzer fix
Renzo-Olivares 3f260ce
Revert "analyzer fix"
Renzo-Olivares b9db35a
Revert "whitespace"
Renzo-Olivares 41765f8
Revert "Move some logic into inferDeltaState"
Renzo-Olivares 8ff4f2d
pass _editingDeltaState instead of editingDeltaState to onChange for …
Renzo-Olivares f4a858a
Add docs for beforeinput
Renzo-Olivares cbb6b6b
Add docs for inferDeltaState
Renzo-Olivares b596600
whitespace
Renzo-Olivares 5a8a5f7
Add more docs
Renzo-Olivares 6645a0b
update docs
Renzo-Olivares da90e99
update docs
Renzo-Olivares 6217ea9
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
Renzo-Olivares b5e0b55
Fix for insertion of a period following a double space within old tex…
Renzo-Olivares 7a5aff9
Fix accent insertion
c4c9cf6
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
9d97c88
clean up comments
0fc279d
Address comments for clarity aand regexp
fc823e9
Make composing and selection nullable
6bf2ca7
update docs
acbc0de
whitespace
7722380
Merge branch 'main' of github.com:flutter/engine into text_editing_de…
0bb7f30
address comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Try to fix tests
- Loading branch information
commit 0dcf1f2f6c74aae9220022ec74e2cca0a11717ce
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Would it make this any simpler if you used inputType? Or is that not possible...
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.
I attempted to use
inputTypehowever there is some normalization I do in order to get the behavior of the Web to fit into the processing we do on the framework side that doesn't allow for this.For example, when trying to use
insertCompositionTextI discovered it is called for the entire composed word.So say we have
hello|and we delete character by character starting at the end. In this caseinsertCompositionTextis called for every deletion. However on Android & iOS, when we delete the final characterhthis is reported as a regular deletion, and not one from the composing region.