Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected removing line breaks on Android #1153

Closed
3 tasks done
pavel-nitka opened this issue Nov 28, 2022 · 2 comments
Closed
3 tasks done

Unexpected removing line breaks on Android #1153

pavel-nitka opened this issue Nov 28, 2022 · 2 comments

Comments

@pavel-nitka
Copy link

pavel-nitka commented Nov 28, 2022

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

馃挜 Demo Page

https://jsbin.com/rugeqoleri/1/edit?html,js,output

Explanation

Open in Android Chrome (on desktop Chrome all works corretly)
type 'AAA'
press 'Enter' to add line break
type 'BBB'
press 'Enter' to add line break
image
press 'Backspace'

  • What is the expected behavior?
    Expected that last line will be removed and cursor will be after 'BBB'

  • What is happening instead?
    Both line breaks is removed
    image

  • What error message are you getting?
    No errors

@pavel-nitka
Copy link
Author

I think issue here
image

it removes element even currentValue.length == lastInputValue.length
when I change condition to
if( currentValue.length > lastInputValue.length && prevElm )
all looks good

@yairEO
Copy link
Owner

yairEO commented Nov 28, 2022

Thanks for digging in and making such an easy issue to read! I will investigate further

@yairEO yairEO closed this as completed in 4224eb9 Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants