DEV: Only focus user card first link if not mouse input (#18960)
This commit is contained in:
parent
07e1b0591f
commit
85bfabd847
|
@ -280,10 +280,12 @@ export default Mixin.create({
|
||||||
// note: we DO NOT use afterRender here cause _positionCard may
|
// note: we DO NOT use afterRender here cause _positionCard may
|
||||||
// run afterwards, if we allowed this to happen the usercard
|
// run afterwards, if we allowed this to happen the usercard
|
||||||
// may be offscreen and we may scroll all the way to it on focus
|
// may be offscreen and we may scroll all the way to it on focus
|
||||||
discourseLater(() => {
|
if (event.pointerId === -1) {
|
||||||
const firstLink = this.element.querySelector("a");
|
discourseLater(() => {
|
||||||
firstLink && firstLink.focus();
|
const firstLink = this.element.querySelector("a");
|
||||||
}, 350);
|
firstLink && firstLink.focus();
|
||||||
|
}, 350);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue