|
3 | 3 | import conformToMask from 'text-mask-core/src/conformToMask'; |
4 | 4 | import { stringMaskToRegExpMask, arrayMaskToRegExpMask } from './maskToRegExpMask'; |
5 | 5 | import { trigger, queryInputElementInside } from './utils'; |
6 | | -import { isAndroid, isChrome } from './utils/env'; |
7 | 6 | import createOptions from './createOptions'; |
8 | 7 | import { defaultMaskReplacers } from './constants'; |
9 | 8 |
|
10 | 9 | const options = createOptions(); |
11 | 10 |
|
| 11 | +/** |
| 12 | + * Convenience wrapper for `trigger(el, 'input')`, which raises |
| 13 | + * an event for Vue to detect a value change. |
| 14 | + * |
| 15 | + * @param {HTMLInputElement} el |
| 16 | + */ |
12 | 17 | function triggerInputUpdate(el) { |
13 | | - const fn = trigger.bind(null, el, 'input'); |
14 | | - if (isAndroid && isChrome) { |
15 | | - setTimeout(fn, 0); |
16 | | - } else { |
17 | | - fn(); |
18 | | - } |
| 18 | + trigger(el, 'input'); |
19 | 19 | } |
20 | 20 |
|
21 | 21 | /** |
@@ -62,7 +62,7 @@ function updateMask(el, inputMask, maskReplacers) { |
62 | 62 | /** |
63 | 63 | * Merge custom mask replacers with default mask replacers |
64 | 64 | * @param {Object<string, RegExp>} maskReplacers |
65 | | - * @param {Objext<string, RegExp>} baseMaskReplacers |
| 65 | + * @param {Object<string, RegExp>} baseMaskReplacers |
66 | 66 | * @return {Object} The extended mask replacers |
67 | 67 | */ |
68 | 68 | function extendMaskReplacers(maskReplacers, baseMaskReplacers = defaultMaskReplacers) { |
|
0 commit comments