Skip to content

srph/vue-issue2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-js-on-submit-bug

A replication of on-submit bug. Demo

Track

Track vuejs/vue#2017.

Update: 0efdd80 fixes this. Thanks to yyx990803.

Elaboration

Clicking "enter" on an input (this triggers the on:submit event) does not remove the data from the input, while clicking the submit button does.

preview

Expected

The input (in the create form) will become blank when I submit the form.

Actual

The input only becomes empty when I click the click the "create" button. When I try to press the enter key, everything works except that the input is emptied (which is intended).

Replicating

  1. Click on the "create a new task" button
  2. Fill the input with characters (anything)
  3. Press the enter key.
  4. Click "create a new task" button, you should be able to see the input filled with the last value you filled it with (broken; unintended).
  5. Repeat steps 1-2.
  6. This time, click the "create" button.
  7. Click "create a new task" button, you should be able to see an empty input (actual; expected).

Running

npm install
npm run build # or npm run watch
open index.html

Note

Hello, I wrote this while being awake for around 18 hours (because Vue suddenly caused an itch). That said, I did a lot of patterns which I did not understand.

Feel free to point them out.

About

[FIXED] A replication of on-submit bug in Vue.js 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published