-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
C: VTextFieldT: bugFunctionality that does not work as intended/expectedFunctionality that does not work as intended/expectedltsplatform specificThe issue only occurs on a specific platformThe issue only occurs on a specific platform
Milestone
Description
Environment
Vuetify Version: 1.5.17
Vue Version: 2.6.10
Browsers: Internet Explorer
OS: Windows 10
Steps to reproduce
Make a <v-text-field> with a mask and type any text in IE11. The value will not be set and you will get the Syntax error in regular expression in the console.
Expected Behavior
The masked text fields should be usable in IE11.
Actual Behavior
You cannot fill in the masked text fields.
Reproduction Link
https://jsbin.com/majopojiqi/edit?js,console (open in IE11)
Other comments
The problem is in the file src/util/mask.ts, in the line:
const defaultDelimiters = /[-!$%^&*()_+|~=`{}[\]:";'<>?,./\\ ]/
which is used by the function unmaskText:
new RegExp(defaultDelimiters, 'g')
However, IE11 requires the new RegExp(pattern, flags) constructor to provide the pattern as a String, not a RegExp object. The solution is to set:
const defaultDelimiters = "[-!$%^&*()_+|~=`{}[\]:\";'<>?,./\\ ]"
wgebis
Metadata
Metadata
Assignees
Labels
C: VTextFieldT: bugFunctionality that does not work as intended/expectedFunctionality that does not work as intended/expectedltsplatform specificThe issue only occurs on a specific platformThe issue only occurs on a specific platform