Skip to content

Commit 9920366

Browse files
authored
shorten explanation
1 parent c6a5b65 commit 9920366

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/web/parserUtils.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -246,20 +246,6 @@ function parseText(target: HTMLElement, text: string, cursorPositionIndex: numbe
246246
/**
247247
* Calculates start, count and before values. Whenever the text is being changed you can think of it as a replacement operation,
248248
* where parts of the string get replaced with new content.
249-
* For example:
250-
*
251-
* 1. Text input is abc
252-
* 2. User adds "d"
253-
* 3. start: 3, before: 0, count: 1
254-
*
255-
* We started to replace text starting from position 3, we replaced 0 characters and added 1 character.
256-
* Another example:
257-
*
258-
* 1. Text input is abc
259-
* 2. User selects "b" and adds "d"
260-
* 3. start: 1, before: 1, count: 1
261-
*
262-
* We started to replace text starting from position 1, we replaced 1 character and added 1 character.
263249
*
264250
* This is to align the onChange event with the native counter part:
265251
* - https://github.com/facebook/react-native/pull/45248

0 commit comments

Comments
 (0)