Thanks @Mittineague
I have been looking into the files, and from what I can see, this line in the handlebars file:
<a {{action "displayEditReason"}} class="display-edit-reason">{{i18n 'composer.show_edit_reason'}}</a>
calls the displayEditReason click handler here:
displayEditReason() {
this.set("showEditReason", true);
}
and then, since showEditReason boolean becomes true, the if branch gets executed in this:
{{#if showEditReason}}
<div class="edit-reason-input">
{{text-field value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
</div>
{{else}}
<a {{action "displayEditReason"}} class="display-edit-reason">{{i18n 'composer.show_edit_reason'}}</a
{{/if}}
and we see the .edit-reason-input field. I then saw this line in the view:
@observes('composeState', 'composer.action')
which makes me feel that something like this:
@observes('showEditReason', function(){
var input = $(".edit-reason-input input");
if(input) input.focus();
})
might be possible.
Or maybe I again mixed up the view code and the controller code so I will first read the docs ![]()