Update autosize, which should fix stack overflow error (#1560)
* Update to the latest version of autosize.js * gitignore: Restrict 'dist' matches to the root dist folder The global search for 'dist' caused problems when updateing bower components. * A couple minor version updates: ByteBuffer, filesize, intlTel moment-with-localse, ProtoBuf
This commit is contained in:
parent
3dc3667b45
commit
fb7701576e
10 changed files with 398 additions and 202 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
International Telephone Input v4.0.1
|
||||
International Telephone Input v4.0.2
|
||||
https://github.com/Bluefieldscom/intl-tel-input.git
|
||||
*/
|
||||
// wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
@ -651,14 +651,7 @@ https://github.com/Bluefieldscom/intl-tel-input.git
|
|||
var dialCode = this._getDialCode(number);
|
||||
if (dialCode) {
|
||||
// check if one of the matching countries is already selected
|
||||
var countryCodes = this.countryCodes[this._getNumeric(dialCode)], alreadySelected = false;
|
||||
if (this.selectedCountryData) {
|
||||
for (var i = 0; i < countryCodes.length; i++) {
|
||||
if (countryCodes[i] == this.selectedCountryData.iso2) {
|
||||
alreadySelected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
var countryCodes = this.countryCodes[this._getNumeric(dialCode)], alreadySelected = this.selectedCountryData && $.inArray(this.selectedCountryData.iso2, countryCodes) != -1;
|
||||
// if a matching country is not already selected (or this is an unknown NANP area code): choose the first in the list
|
||||
if (!alreadySelected || this._isUnknownNanp(number, dialCode)) {
|
||||
// if using onlyCountries option, countryCodes[0] may be empty, so we must find the first non-empty index
|
||||
|
@ -706,9 +699,8 @@ https://github.com/Bluefieldscom/intl-tel-input.git
|
|||
// and the input's placeholder
|
||||
this._updatePlaceholder();
|
||||
// update the active list item
|
||||
var listItem = this.countryListItems.children(".iti-flag." + countryCode).first().parent();
|
||||
this.countryListItems.removeClass("active");
|
||||
listItem.addClass("active");
|
||||
this.countryListItems.children(".iti-flag." + countryCode).first().parent().addClass("active");
|
||||
},
|
||||
// update the input placeholder to an example number from the currently selected country
|
||||
_updatePlaceholder: function() {
|
||||
|
@ -1004,4 +996,4 @@ JSON.stringify(result);
|
|||
areaCodes: c[4] || null
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue