mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
Fix scrol jump when select activtiies in global activities (#1907)
This commit is contained in:
parent
6d423ed986
commit
81aef81634
1 changed files with 4 additions and 1 deletions
|
@ -308,7 +308,10 @@ $.fn.extend({
|
||||||
var groups;
|
var groups;
|
||||||
var groupChildrens;
|
var groupChildrens;
|
||||||
$('.select2-selection').scrollTo(0);
|
$('.select2-selection').scrollTo(0);
|
||||||
$('.select2-results__options').scrollTop($(e.currentTarget).data('scrolltop'));
|
// Fix scroll to selected element after click
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.select2-results__options').scrollTop($(e.currentTarget).data('scrolltop'));
|
||||||
|
}, 0);
|
||||||
if (this.dataset.singleDisplay === 'true') {
|
if (this.dataset.singleDisplay === 'true') {
|
||||||
$(this).updateSingleName();
|
$(this).updateSingleName();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue