mirror of
https://github.com/zhigang1992/bootstrap-tokenfield.git
synced 2026-01-12 17:12:44 +08:00
Add IE support
This commit is contained in:
12
js/bootstrap-tokenfield.js
vendored
12
js/bootstrap-tokenfield.js
vendored
@@ -650,6 +650,18 @@
|
||||
}
|
||||
|
||||
, createTokensFromInput: function (e, focus) {
|
||||
try {
|
||||
if (clipboardData) {
|
||||
var clipData = clipboardData.getData('Text');
|
||||
if (clipData != null || clipData !== '') {
|
||||
clipData = clipData.replace(/^\s+|\s+$/g,'');
|
||||
}
|
||||
if (/^\d/.test(clipData)) {
|
||||
this.$input.val(clipData.replace(/(\r\n|\n|\r)/gm, ' '));
|
||||
clipboardData.clearData();
|
||||
}
|
||||
}
|
||||
} catch(e) {}
|
||||
if (this.$input.val().length < this.options.minLength)
|
||||
return // No input, simply return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user