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 10:06:23 -06:00
committed by GitHub
co-authored by Drew Slobodnjak
parent d4304b59ec
commit 0b822478b6
@@ -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);