Skip to content

Commit

Permalink
prevented textarea from intercepting mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
mtanda committed Oct 10, 2024
1 parent 5351e0d commit 5051d64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/KeyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ export class KeyHandler extends EventEmitter<"input", (s: string) => void> {
if (isChrome()) {
this.elem.addEventListener("compositionstart", (e: CompositionEvent) => {
this.isComposing = true;
this.elem.style.zIndex = "1";
});
this.elem.addEventListener("compositionend", (e: CompositionEvent) => {
this.isComposing = false;
this.elem.style.zIndex = "-1";
acceptInput(e);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
position: absolute;
margin: 0px;
padding: 0px;
z-index: 1;
z-index: -1;
}
#canvas {
position: absolute;
Expand Down

0 comments on commit 5051d64

Please sign in to comment.