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

fix: ignore composing key events to prevent unintended behavior #1059

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### 3.1.1 3000
### 3.1.1.3100

- Fixed an issue where history navigation is accidentally triggered during IME composition

### 3.1.1.3000

- Added support for animated FFZ emotes
- Added option to hide whispers
Expand Down
1 change: 1 addition & 0 deletions src/app/emote-menu/EmoteMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ onKeyStroke("e", (ev) => {

// Up/Down Arrow iterates providers
useEventListener("keydown", (ev) => {
if (ev.isComposing) return;
if (!["ArrowUp", "ArrowDown"].includes(ev.key)) return;

const cur = Object.keys(visibleProviders).indexOf(activeProvider.value ?? "7TV");
Expand Down
2 changes: 2 additions & 0 deletions src/site/kick.com/modules/chat/ChatAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ useEventListener(
inputEl,
"keydown",
(ev: KeyboardEvent) => {
if (ev.isComposing) return;

const sel = document.getSelection();
if (!sel) return;

Expand Down
2 changes: 2 additions & 0 deletions src/site/twitch.tv/modules/chat-input/ChatInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ function resetState() {
}

function onKeyDown(ev: KeyboardEvent) {
if (ev.isComposing) return;

switch (ev.key) {
case "Tab":
handleTabPress(ev, isShift.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ useEventListener(
"keydown",
(ev) => {
if (!shouldListenToArrowPresses.value) return;
if (ev.isComposing) return;

if (ev.key === "ArrowLeft") {
emit("back", ev);
Expand Down
Loading