Commit 373b1036 authored by Roma Nikulin's avatar Roma Nikulin Committed by

fix Import, rebuild

parent c701a9be
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
// https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
// Copy paste from https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
export default function () {
var w = window,
d = w.document;
......
......@@ -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();
}
......
......@@ -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",
......
......@@ -58,7 +58,7 @@
</template>
<script>
import MaskedInput from '../dist/maskedInput.js'
import MaskedInput from './MaskedInput.js'
import Vue from 'vue'
import 'babel-polyfill'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment