feat: stop event propagation of input box to better fit certain websites like Notion (#106)

This commit is contained in:
josc146
2023-03-28 16:04:48 +08:00
parent df0bf5e222
commit fc8220375d
+1
View File
@@ -11,6 +11,7 @@ export function InputBox({ onSubmit, enabled }) {
})
const onKeyDown = (e) => {
e.stopPropagation()
if (e.keyCode === 13 && e.shiftKey === false) {
e.preventDefault()
if (!value) return