Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vue-masked-input
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Barabash
vue-masked-input
Commits
373b1036
Commit
373b1036
authored
May 06, 2017
by
Roma Nikulin
Committed by
May 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Import, rebuild
parent
c701a9be
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
+11
-7
dist/demo.js
dist/demo.js
+1
-1
dist/demo.js.map
dist/demo.js.map
+1
-1
dist/ff-polyfill.js
dist/ff-polyfill.js
+1
-1
dist/maskedInput.js
dist/maskedInput.js
+6
-2
package.json
package.json
+1
-1
src/App.vue
src/App.vue
+1
-1
No files found.
dist/demo.js
View file @
373b1036
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/demo.js.map
View file @
373b1036
This diff is collapsed.
Click to expand it.
dist/ff-polyfill.js
View file @
373b1036
// https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
//
Copy paste from
https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
export
default
function
()
{
var
w
=
window
,
d
=
w
.
document
;
...
...
dist/maskedInput.js
View file @
373b1036
...
...
@@ -86,6 +86,7 @@ export default {
pattern
:
this
.
mask
,
value
:
''
,
placeholderChar
:
this
.
placeholderChar
,
/* eslint-disable quote-props */
formatCharacters
:
{
'
a
'
:
{
validate
:
function
validate
(
char
)
{
...
...
@@ -166,7 +167,8 @@ export default {
case
37
:
e
.
preventDefault
();
if
(
this
.
$refs
.
input
.
selectionStart
===
this
.
$refs
.
input
.
selectionEnd
)
{
this
.
$refs
.
input
.
selectionEnd
=
this
.
$refs
.
input
.
selectionStart
--
;
// this.$refs.input.selectionEnd = this.$refs.input.selectionStart - 1; @TODO
this
.
$refs
.
input
.
selectionStart
-=
1
;
}
this
.
maskCore
.
selection
=
{
start
:
this
.
$refs
.
input
.
selectionStart
,
...
...
@@ -237,7 +239,9 @@ export default {
// works only on Desktop
if
(
e
.
ctrlKey
)
return
;
// Fix FF copy/paste issue
// IE & FF are not trigger textInput event, so we have to force it
/* eslint-disable */
var
isIE
=
/*@cc_on!@*/
false
||
!!
document
.
documentMode
;
//by http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
/* eslint-enable */
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
if
(
isIE
||
isFirefox
)
{
e
.
preventDefault
();
...
...
@@ -261,7 +265,7 @@ export default {
if
(
this
.
$refs
.
input
.
selectionStart
!==
this
.
$refs
.
input
.
selectionEnd
)
{
try
{
document
.
execCommand
(
'
copy
'
);
}
catch
(
err
)
{}
}
catch
(
err
)
{}
// eslint-disable-line no-empty
this
.
maskCore
.
backspace
();
this
.
updateToCoreState
();
}
...
...
package.json
View file @
373b1036
...
...
@@ -11,7 +11,7 @@
"babel"
:
"npm run babel-component & npm run babel-poly"
,
"babel-component"
:
"babel src/ff-polyfill.js --out-file dist/ff-polyfill.js"
,
"babel-poly"
:
"babel src/MaskedInput.js --out-file dist/maskedInput.js"
,
"build"
:
"cross-env NODE_ENV=production webpack --progress --hide-modules& npm run babel"
"build"
:
"cross-env NODE_ENV=production webpack --progress --hide-modules
& npm run babel"
},
"repository"
:
{
"type"
:
"git"
,
...
...
src/App.vue
View file @
373b1036
...
...
@@ -58,7 +58,7 @@
</
template
>
<
script
>
import
MaskedInput
from
'
.
./dist/m
askedInput.js
'
import
MaskedInput
from
'
.
/M
askedInput.js
'
import
Vue
from
'
vue
'
import
'
babel-polyfill
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment