Skip to content

Commit

Permalink
fix(Pagination): block default events for the enter key (#7368)
Browse files Browse the repository at this point in the history
* fix(Pagination): block default events for the enter key

* refactor: consider other keyboard events
  • Loading branch information
selicens authored Apr 19, 2024
1 parent 2b41e56 commit 4815ee6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/vc-pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export default defineComponent({
},
runIfEnter(event, callback, ...restParams) {
if (event.key === 'Enter' || event.charCode === 13) {
event.preventDefault();
callback(...restParams);
}
},
Expand Down

0 comments on commit 4815ee6

Please sign in to comment.