mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FEATURE: make # more useful for keyboard users
This commit is contained in:
parent
b143b64511
commit
e227b68f8d
@ -4,10 +4,16 @@ export default Ember.ObjectController.extend({
|
||||
expanded: false,
|
||||
|
||||
actions: {
|
||||
toggleExpansion: function() {
|
||||
toggleExpansion: function(opts) {
|
||||
this.toggleProperty('expanded');
|
||||
if (this.get('expanded')) {
|
||||
this.set('toPostNumber', this.get('progressPosition'));
|
||||
if(opts && opts.highlight){
|
||||
// TODO: somehow move to view?
|
||||
Em.run.next(function(){
|
||||
$('.jump-form input').select().focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -134,7 +134,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
||||
},
|
||||
|
||||
toggleProgress: function() {
|
||||
Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion');
|
||||
Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true});
|
||||
},
|
||||
|
||||
showSearch: function(selectContext) {
|
||||
|
Loading…
Reference in New Issue
Block a user