{"id":16978715,"url":"https://github.com/srph/vue-issue2017","last_synced_at":"2026-05-16T12:32:31.385Z","repository":{"id":75646758,"uuid":"47912985","full_name":"srph/vue-issue2017","owner":"srph","description":"[FIXED] A replication of on-submit bug in Vue.js 1","archived":false,"fork":false,"pushed_at":"2015-12-14T04:07:48.000Z","size":220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-01-26T17:15:44.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://srph.github.io/vue-issue2017","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srph.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-13T09:23:51.000Z","updated_at":"2016-10-27T11:13:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"de265809-dbc5-48bf-b931-ba999e75e167","html_url":"https://github.com/srph/vue-issue2017","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fvue-issue2017","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fvue-issue2017/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fvue-issue2017/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Fvue-issue2017/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/vue-issue2017/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880550,"owners_count":20525511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T01:44:03.623Z","updated_at":"2026-05-16T12:32:26.361Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-js-on-submit-bug\nA replication of on-submit *bug*. [Demo](https://srph-playground.github.io/vue-js-on-submit-bug)\n\n### Track \nTrack https://github.com/vuejs/vue/issues/2017.\n\n**Update**: [0efdd80](https://github.com/vuejs/vue/commit/0efdd8080721b5288f086b8c7d6bd8bce4f4af5a) fixes this. Thanks to [yyx990803](https://github.com/yyx990803).\n\n### Elaboration\nClicking \"enter\" on an input (this triggers the `on:submit` event) does not remove the data from the input, while clicking the `submit` button does.\n\n![preview](preview.gif)\n\n### Expected\n\nThe input (in the create form) will become blank when I submit the form.\n\n### Actual\n\nThe 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).\n\n### Replicating\n\n1. Click on the \"create a new task\" button\n2. Fill the input with characters (anything)\n3. Press the enter key.\n4. 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).\n5. Repeat steps 1-2.\n6. This time, click the \"create\" button.\n7. Click \"create a new task\" button, you should be able to see an empty input (actual; expected). \n\n### Running\n```bash\nnpm install\nnpm run build # or npm run watch\nopen index.html\n```\n\n### Note\nHello, 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.\n\nFeel free to point them out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fvue-issue2017","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Fvue-issue2017","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Fvue-issue2017/lists"}