fix(Pagination): block default events for the enter key (#7368)
* fix(Pagination): block default events for the enter key * refactor: consider other keyboard eventspull/7516/head
parent
2b41e56520
commit
4815ee6f20
|
@ -283,6 +283,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
runIfEnter(event, callback, ...restParams) {
|
runIfEnter(event, callback, ...restParams) {
|
||||||
if (event.key === 'Enter' || event.charCode === 13) {
|
if (event.key === 'Enter' || event.charCode === 13) {
|
||||||
|
event.preventDefault();
|
||||||
callback(...restParams);
|
callback(...restParams);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue