mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-17 22:42:22 +08:00
Merge pull request #1730 from aignatov-bio/ai-sci-3410-add-task-tag-on-enter
Add task tag on enter button [SCI-3410]
This commit is contained in:
commit
60fd1a02c6
1 changed files with 4 additions and 1 deletions
|
|
@ -145,12 +145,15 @@ $.fn.extend({
|
|||
|
||||
$('.select2').find('input, .select2-selection__rendered').off('keydown').on('keydown', function(e) {
|
||||
var activeElement = $('.select2-results .arrow_pointer');
|
||||
var firstElement = $('.select2-results .select2-results__option').first();
|
||||
var groupElement = activeElement.find('.select2-results__group');
|
||||
if (e.keyCode === 13) {
|
||||
if (groupElement.length > 0) {
|
||||
groupElement.click();
|
||||
} else {
|
||||
} else if (activeElement.length > 0) {
|
||||
activeElement.mouseup();
|
||||
} else {
|
||||
firstElement.mouseup();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue