Skip to content

Commit 373b103

Browse files
niksmr
authored and
committed
fix Import, rebuild
1 parent c701a9b commit 373b103

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

dist/demo.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/demo.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ff-polyfill.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
1+
// Copy paste from https://gist.github.com/nuxodin/9250e56a3ce6c0446efa
22
export default function () {
33
var w = window,
44
d = w.document;

dist/maskedInput.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default {
8686
pattern: this.mask,
8787
value: '',
8888
placeholderChar: this.placeholderChar,
89+
/* eslint-disable quote-props */
8990
formatCharacters: {
9091
'a': {
9192
validate: function validate(char) {
@@ -166,7 +167,8 @@ export default {
166167
case 37:
167168
e.preventDefault();
168169
if (this.$refs.input.selectionStart === this.$refs.input.selectionEnd) {
169-
this.$refs.input.selectionEnd = this.$refs.input.selectionStart--;
170+
// this.$refs.input.selectionEnd = this.$refs.input.selectionStart - 1; @TODO
171+
this.$refs.input.selectionStart -= 1;
170172
}
171173
this.maskCore.selection = {
172174
start: this.$refs.input.selectionStart,
@@ -237,7 +239,9 @@ export default {
237239
// works only on Desktop
238240
if (e.ctrlKey) return; // Fix FF copy/paste issue
239241
// IE & FF are not trigger textInput event, so we have to force it
242+
/* eslint-disable */
240243
var isIE = /*@cc_on!@*/false || !!document.documentMode; //by http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
244+
/* eslint-enable */
241245
var isFirefox = typeof InstallTrigger !== 'undefined';
242246
if (isIE || isFirefox) {
243247
e.preventDefault();
@@ -261,7 +265,7 @@ export default {
261265
if (this.$refs.input.selectionStart !== this.$refs.input.selectionEnd) {
262266
try {
263267
document.execCommand('copy');
264-
} catch (err) {}
268+
} catch (err) {} // eslint-disable-line no-empty
265269
this.maskCore.backspace();
266270
this.updateToCoreState();
267271
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"babel": "npm run babel-component & npm run babel-poly",
1212
"babel-component": "babel src/ff-polyfill.js --out-file dist/ff-polyfill.js",
1313
"babel-poly": "babel src/MaskedInput.js --out-file dist/maskedInput.js",
14-
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules& npm run babel"
14+
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules & npm run babel"
1515
},
1616
"repository": {
1717
"type": "git",

src/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</template>
5959

6060
<script>
61-
import MaskedInput from '../dist/maskedInput.js'
61+
import MaskedInput from './MaskedInput.js'
6262
import Vue from 'vue'
6363
import 'babel-polyfill'
6464

0 commit comments

Comments
 (0)