Skip to content

Commit 9515ed6

Browse files
authored
🩹 Ignore input keys in theme changer (#626)
1 parent e7822c8 commit 9515ed6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎assets/javascript/custom.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ $(function() {
215215

216216
// Watch for a certain keypress to toggle dark mode
217217
$(document).keypress(function(e) {
218+
if ($(e.target).is('input, textarea, [contenteditable="true"]')) return;
218219
const c = String.fromCharCode(e.which).toLowerCase();
219220
if (c == 'd' || c == 'n') // 'd' or 'n' key
220221
userToggleDarkMode();

0 commit comments

Comments
 (0)