chore: [input-number] add comment (#19044)

* chore: [input-number] add comment

* Update packages/components/input-number/src/input-number.vue

Co-authored-by: qiang <qw13131wang@gmail.com>

---------

Co-authored-by: qiang <qw13131wang@gmail.com>
This commit is contained in:
btea
2024-11-29 07:59:32 +08:00
committed by GitHub
parent f7ffee32d9
commit 81d5b4beda

View File

@@ -84,6 +84,7 @@ import { vRepeatClick } from '@element-plus/directives'
import { useLocale, useNamespace } from '@element-plus/hooks'
import {
debugWarn,
isFirefox,
isNumber,
isString,
isUndefined,
@@ -292,7 +293,10 @@ const handleFocus = (event: MouseEvent | FocusEvent) => {
const handleBlur = (event: MouseEvent | FocusEvent) => {
data.userInput = null
if (data.currentValue === null && input.value?.input) {
// This is a Firefox-specific problem. When non-numeric content is entered into a numeric input box,
// the content displayed on the page is not cleared after the value is cleared. #18533
// https://bugzilla.mozilla.org/show_bug.cgi?id=1398528
if (isFirefox() && data.currentValue === null && input.value?.input) {
input.value.input.value = ''
}
emit('blur', event)