Skip to content

Commit

Permalink
Fix Chinese input method Enter on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
cyhhao committed Feb 14, 2023
1 parent 0871824 commit 95f8c16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src-tauri/src/scripts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ async function init() {
}
});

// Fix Chinese input method "Enter" on Safari
document.addEventListener("keydown",(e)=>{
if(e.keyCode==229) e.stopPropagation();
}, true)

if (window.location.host === 'chat.openai.com') {
window.__sync_prompts = async function() {
await invoke('sync_prompts', { time: Date.now() });
Expand Down

0 comments on commit 95f8c16

Please sign in to comment.