mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 10:42:46 +08:00
fix(tags): TagDiscussionModal don't go to null tag (#3404)
If the tag we are trying to select/highlight is undefined, we should not run the scroll animation.
This commit is contained in:
parent
42602a099f
commit
4cb15501a2
@ -322,7 +322,7 @@ export default class TagDiscussionModal extends Modal<TagDiscussionModalAttrs> {
|
||||
|
||||
m.redraw();
|
||||
|
||||
if (scrollToItem) {
|
||||
if (scrollToItem && this.selectedTag) {
|
||||
const dropdownScroll = $dropdown.scrollTop()!;
|
||||
const dropdownTop = $dropdown.offset()!.top;
|
||||
const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;
|
||||
|
Loading…
x
Reference in New Issue
Block a user