From 4815ee6f20f3f2548a1ae6221e2ff7ef5d83df57 Mon Sep 17 00:00:00 2001 From: selicens <1244620067@qq.com> Date: Fri, 19 Apr 2024 22:44:34 +0800 Subject: [PATCH] fix(Pagination): block default events for the enter key (#7368) * fix(Pagination): block default events for the enter key * refactor: consider other keyboard events --- components/vc-pagination/Pagination.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/vc-pagination/Pagination.tsx b/components/vc-pagination/Pagination.tsx index d0c3b7152..71c416b24 100644 --- a/components/vc-pagination/Pagination.tsx +++ b/components/vc-pagination/Pagination.tsx @@ -283,6 +283,7 @@ export default defineComponent({ }, runIfEnter(event, callback, ...restParams) { if (event.key === 'Enter' || event.charCode === 13) { + event.preventDefault(); callback(...restParams); } },