Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keydown 이벤트에서 preventDefault에 대한 한글입력방지가 안됩니다. #3289

Open
enterson1 opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@enterson1
Copy link

아래의 소스상에서 keydown 이벤트 추가시, 한글입력의 경우 입력방지가 적용되지 않습니다.

instance.on('keydown', (editorType, event) => {
const functionKeys = Array.from({ length: 12 }, (_, i) => F${i + 1});

		                    // 복사/전체 선택은 허용
		                    if ((event.ctrlKey || event.metaKey) && (event.key === 'c' || event.key === 'a')) {
		                        return;
		                    }

		                    // 기능키(F1~F12)는 허용
		                    if (functionKeys.includes(event.key)) {
		                        return;
		                    }
		                    event.preventDefault();
	                	});
@enterson1 enterson1 added the Bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant