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

Submit on keydown.enter #107

Open
Canser opened this issue Sep 2, 2019 · 0 comments
Open

Submit on keydown.enter #107

Canser opened this issue Sep 2, 2019 · 0 comments

Comments

@Canser
Copy link

Canser commented Sep 2, 2019

Is it possible to change the behaviour of the input area;

On enter submit, on shift+enter insert a new line.

I have tried using @keydown.native="handleSubmit" but it's acting strange. It's submitting before the given model changed.

Any idea?

Note: Enter is working with e.preventDefault() but the problem is still remains; bind v-model is not changing immediately on keypress. I have even tried with nextTick but does not help. I do not want to wait with timeout or something.

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

1 participant