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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@behel33 Thanks for creating the issue, I couldn't recreate the behavior you described, can you help fix this codesandbox https://codesandbox.io/s/x761qq5p3q #739

Closed
behel33 opened this issue Feb 16, 2019 · 1 comment

Comments

@behel33
Copy link

behel33 commented Feb 16, 2019

@behel33 Thanks for creating the issue, I couldn't recreate the behavior you described, can you help fix this codesandbox https://codesandbox.io/s/x761qq5p3q

Originally posted by @bigopon in #733 (comment)

Sorry to answer so late. ;-)
In your https://codesandbox.io/s/x761qq5p3q under chromium the bug is present.
Chromium : Version 70.0.3538.102 (Build officiel) (64 bits) Windows 10 Pro.
To get the bog ,input keys like this :
input "45"
input key TAB => here it become "45.00", and cursor is on second field
input keys SHIFT+TAB => cursor go to first fiels and "45" is selected
input "45"
input key TAB => cursor go to second field, and "45" was not converted in "45.00"

@bigopon
Copy link
Member

bigopon commented Feb 17, 2019

@behel33 The feature you want to have is an advanced scenario, where you cannot let everything run automatically without any issues. Consider what steps need to happen under the hood:

  • When input: the value should be kept as is, and update view model, but do not update back to the input
  • When blur: the input should only update the appearance, but not the underlying value in view model
  • When focus: the input should remove the appended string, but only when it ends with that string.

I have updated that codesandbox with a second input to show you how it could be implemented. https://codesandbox.io/s/x761qq5p3q

It's not a simple scenario, and it's not a bug on Aurelia site, so it would be great if you could help create help request on Discourse https://discourse.aurelia.io next time, instead of an issue like this here.

@EisenbergEffect @behel33 This and #733 can be closed.

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

3 participants