mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Wait for render before invoking A11YDialog (#24100)
Previously, focus wasn't being applied correctly on dialogs using named components. This was because the A11YDialog was being invoked before the component was completely rendered. The long-term plan is to move away from A11YDialog doing the rendering here, but for now this should do.
This commit is contained in:
@@ -16,7 +16,7 @@ export default class AdminWebHooksIndexController extends Controller {
|
||||
@alias("adminWebHooks.model") model;
|
||||
|
||||
@action
|
||||
destroy(webhook) {
|
||||
destroyWebhook(webhook) {
|
||||
return this.dialog.deleteConfirm({
|
||||
message: I18n.t("admin.web_hooks.delete_confirm"),
|
||||
didConfirm: async () => {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default class AdminWebHooksShowController extends Controller {
|
||||
}
|
||||
|
||||
@action
|
||||
destroy() {
|
||||
destroyWebhook() {
|
||||
return this.dialog.deleteConfirm({
|
||||
message: I18n.t("admin.web_hooks.delete_confirm"),
|
||||
didConfirm: async () => {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</LinkTo>
|
||||
|
||||
<DButton
|
||||
@action={{fn this.destroy webhook}}
|
||||
@action={{fn this.destroyWebhook webhook}}
|
||||
@icon="times"
|
||||
@title="delete"
|
||||
class="destroy btn-danger"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/>
|
||||
|
||||
<DButton
|
||||
@action={{this.destroy}}
|
||||
@action={{this.destroyWebhook}}
|
||||
@icon="times"
|
||||
@title="delete"
|
||||
class="destroy btn-danger admin-webhooks__delete-button"
|
||||
|
||||
Reference in New Issue
Block a user