mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
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
|
||||
// run afterwards, if we allowed this to happen the usercard
|
||||
// may be offscreen and we may scroll all the way to it on focus
|
||||
discourseLater(() => {
|
||||
const firstLink = this.element.querySelector("a");
|
||||
firstLink && firstLink.focus();
|
||||
}, 350);
|
||||
if (event.pointerId === -1) {
|
||||
discourseLater(() => {
|
||||
const firstLink = this.element.querySelector("a");
|
||||
firstLink && firstLink.focus();
|
||||
}, 350);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user