Resolved the issue stated in issue #90426. (#90465)

* Resolved the issue stated in issue #90426.

* Method created to get the length of the url.

* Applied the length logic and intentional fall through in switch.

* Changed the way length calculated

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>

* Remove un-used method getUrlLength

* Refactoring

---------

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
This commit is contained in:
Kavindu Nilshan 2024-07-25 21:36:23 +05:30 committed by GitHub
parent d4304b59ec
commit 0b822478b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,6 +132,9 @@ export const DataLinkInput = memo(
switch (event.key) {
case 'Backspace':
if (stateRef.current.linkUrl.focusText.getText().length === 1) {
next();
}
case 'Escape':
setShowingSuggestions(false);
return setSuggestionsIndex(0);