🐛 fix(frontend): 修复 macOS Caps Lock 输入浮层

This commit is contained in:
Syngnat
2026-04-28 10:21:19 +08:00
parent 225e9e61ed
commit 299a80dd5a
3 changed files with 13 additions and 12 deletions

View File

@@ -1,5 +1,4 @@
export const noAutoCapInputProps = {
autoCapitalize: 'none' as const,
autoCorrect: 'off' as const,
spellCheck: false,
};
@@ -10,7 +9,9 @@ export const applyNoAutoCapAttributes = (element: Element) => {
return;
}
element.setAttribute('autocapitalize', 'none');
if (typeof element.removeAttribute === 'function') {
element.removeAttribute('autocapitalize');
}
element.setAttribute('autocorrect', 'off');
element.setAttribute('spellcheck', 'false');
};