mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-10 23:28:04 -04:00
FIX: clicking on username was causing page to scroll all the way up
This commit is contained in:
parent
927f14ebda
commit
1fdf9038db
1 changed files with 5 additions and 1 deletions
|
@ -76,7 +76,11 @@ export default Discourse.View.extend(CleansUp, {
|
||||||
|
|
||||||
_shown() {
|
_shown() {
|
||||||
// After the card is shown, focus on the first link
|
// After the card is shown, focus on the first link
|
||||||
Ember.run.scheduleOnce('afterRender', () => this.$('a:first').focus() );
|
//
|
||||||
|
// note: we DO NOT use afterRender here cause _willShow may
|
||||||
|
// run after _shown, if we allowed this to happen the usercard
|
||||||
|
// may be offscreen and we may scroll all the way to it on focus
|
||||||
|
Ember.run.next(null, () => this.$('a:first').focus() );
|
||||||
},
|
},
|
||||||
|
|
||||||
_willShow(target) {
|
_willShow(target) {
|
||||||
|
|
Loading…
Reference in a new issue