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:
Penar Musaraj
2023-10-26 08:24:47 -04:00
committed by GitHub
parent d405305456
commit b8ee52c4cb
6 changed files with 18 additions and 21 deletions

View File

@@ -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 () => {

View File

@@ -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 () => {

View File

@@ -51,7 +51,7 @@
</LinkTo>
<DButton
@action={{fn this.destroy webhook}}
@action={{fn this.destroyWebhook webhook}}
@icon="times"
@title="delete"
class="destroy btn-danger"

View File

@@ -15,7 +15,7 @@
/>
<DButton
@action={{this.destroy}}
@action={{this.destroyWebhook}}
@icon="times"
@title="delete"
class="destroy btn-danger admin-webhooks__delete-button"