fix: instagram input translate: addEventListener keyup

This commit is contained in:
Gabe Yuan
2023-12-27 11:25:53 +08:00
parent 35f4fa6aa7
commit d2d18a2384

View File

@@ -36,8 +36,8 @@ export const shortcutListener = (fn, target = document, timeout = 3000) => {
}
};
target.addEventListener("keydown", handleKeydown);
target.addEventListener("keyup", handleKeyup);
target.addEventListener("keydown", handleKeydown, true);
target.addEventListener("keyup", handleKeyup, true);
return () => {
if (timer) {
clearTimeout(timer);