mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user