FIX: Add autofocus to users chooser on the assign modal (#148)
The users chooser on the assign modal is the primary input field on the modal, so it makes to shift focus to it when the modal is opened. This PR needs 0f807ba85b
in core to work properly, but it won't cause errors (won't have any effects) if it's deployed to a site that doesn't have that commit.
This commit is contained in:
parent
394f857096
commit
a90e7ab7e2
|
@ -1,12 +1,14 @@
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { inject as controller } from "@ember/controller";
|
||||
import { not } from "@ember/object/computed";
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
topicBulkActions: controller(),
|
||||
assignSuggestions: null,
|
||||
allowedGroups: null,
|
||||
taskActions: Ember.inject.service(),
|
||||
autofocus: not("capabilities.touch"),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
includeGroups=false
|
||||
groupMembersOf=allowedGroups
|
||||
maximum=1
|
||||
autofocus=autofocus
|
||||
)
|
||||
}}
|
||||
<div class="assign-suggestions">
|
||||
|
|
Loading…
Reference in New Issue