From 95f8c16be0cddc5d7b4f16678f5ca0eb1a8467e3 Mon Sep 17 00:00:00 2001 From: cyhhao Date: Tue, 14 Feb 2023 16:10:44 +0800 Subject: [PATCH] Fix Chinese input method Enter on Safari --- src-tauri/src/scripts/core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src-tauri/src/scripts/core.js b/src-tauri/src/scripts/core.js index 734a277..d852b55 100644 --- a/src-tauri/src/scripts/core.js +++ b/src-tauri/src/scripts/core.js @@ -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() });