Merge pull request #7565 from MrPetovan/bug/7406-neutralize-enter-in-autocomplete
Prevents Enter from submitting forms in ACL fields
This commit is contained in:
commit
3c7f7b45cd
5 changed files with 12 additions and 6 deletions
|
|
@ -481,9 +481,9 @@
|
|||
|
||||
var text = $input.val(),
|
||||
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
||||
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
||||
if (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached) {
|
||||
// Only attempt to add a tag if there is data in the field
|
||||
if (text.length !== 0) {
|
||||
if (self.options.freeInput && text.length !== 0) {
|
||||
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
||||
$input.val('');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<button id="acl-showall" class="btn btn-block btn-default"><i class="fa fa-globe"></i> {{$showall}}</button>
|
||||
</div>
|
||||
<div class="form-group form-group-search">
|
||||
<input type="text" id="acl-search" class="form-control form-search">
|
||||
<input type="text" id="acl-search" class="form-control form-search" autocomplete="off">
|
||||
</div>
|
||||
<div id="acl-list">
|
||||
<div id="acl-list-content"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue