Browse Source

fix: Safari of input IME (#7918)

renovate/glob-11.x
snoweast 2 weeks ago committed by GitHub
parent
commit
12fcfa15b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      components/input-number/src/InputNumber.tsx

6
components/input-number/src/InputNumber.tsx

@ -395,6 +395,11 @@ export default defineComponent({
} }
}; };
// Solve the issue of the event triggering sequence when entering numbers in chinese input (Safari)
const onBeforeInput = () => {
userTypingRef.value = true;
};
const onKeyDown: KeyboardEventHandler = event => { const onKeyDown: KeyboardEventHandler = event => {
const { which } = event; const { which } = event;
userTypingRef.value = true; userTypingRef.value = true;
@ -577,6 +582,7 @@ export default defineComponent({
onBlur={onBlur} onBlur={onBlur}
onCompositionstart={onCompositionStart} onCompositionstart={onCompositionStart}
onCompositionend={onCompositionEnd} onCompositionend={onCompositionEnd}
onBeforeinput={onBeforeInput}
/> />
</div> </div>
</div> </div>

Loading…
Cancel
Save