You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of jQuery UI Tag-IT is impossible to enter the letter "б" on the russian layout, as it is on the same key as the comma, but a comma separators.
Slightly rewrite the events to make it work.
Maybe someone will come in handy)
// Events.
this.tagInput
.keypress(function(event) {
if (
(event.charCode == '44') ||
event.which === $.ui.keyCode.ENTER ||
(
event.which == $.ui.keyCode.TAB &&
that.tagInput.val() !== ''
) ||
(
event.which == $.ui.keyCode.SPACE &&
that.options.allowSpaces !== true &&
(
$.trim(that.tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' ||
(
$.trim(that.tagInput.val()).charAt(0) == '"' &&
$.trim(that.tagInput.val()).charAt($.trim(that.tagInput.val()).length - 1) == '"' &&
$.trim(that.tagInput.val()).length - 1 !== 0
)
)
)
) {
if (!(event.which === $.ui.keyCode.ENTER && that.tagInput.val() === '')) {
event.preventDefault();
}
if (!(that.options.autocomplete.autoFocus && that.tagInput.data('autocomplete-open'))) {
that.tagInput.autocomplete('close');
that.createTag(that._cleanedInput());
}
}
}).keydown(function(e){
if (event.which == $.ui.keyCode.BACKSPACE && that.tagInput.val() === '') {
var tag = that._lastTag();
if (!that.options.removeConfirmation || tag.hasClass('remove')) {
// When backspace is pressed, the last tag is deleted.
that.removeTag(tag);
} else if (that.options.removeConfirmation) {
tag.addClass('remove ui-state-highlight');
}
} else if (that.options.removeConfirmation) {
that._lastTag().removeClass('remove ui-state-highlight');
}
}).blur(function(e){
if (!that.tagInput.data('autocomplete-open')) {
that.createTag(that._cleanedInput());
}
});
The text was updated successfully, but these errors were encountered:
The current version of jQuery UI Tag-IT is impossible to enter the letter "б" on the russian layout, as it is on the same key as the comma, but a comma separators.
Slightly rewrite the events to make it work.
Maybe someone will come in handy)
The text was updated successfully, but these errors were encountered: