integration_url_modal: Fix multiple modals opening.

Earlier the `generate integration url` button (fa-link) was still in
focus even after opening the modal.
This caused the modal to open multiple times when the user pressed the
enter key. This commit fixes that issue by focusing on the input
dropdown when the modal is opened.
This commit is contained in:
Kenneth Rodrigues
2024-07-18 00:17:57 +05:30
committed by Tim Abbott
parent 5023daaf9b
commit 2be9774192

View File

@@ -278,5 +278,8 @@ export function show_generate_integration_url_modal(api_key: string): void {
return;
},
post_render: generate_integration_url_post_render,
on_shown() {
$("#integration-name_widget").trigger("focus");
},
});
}