Skip to content

Commit

Permalink
Focus on chat widget once loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
StackedPancakez committed Nov 14, 2023
1 parent 5e55c4c commit 8b0cefb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/webpacker/controllers/chat_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export default class extends Controller {
this.waitForZendeskScript(() => {
this.showWebWidget();
this.waitForWebWidget(() => {
const chat = document.querySelector('[title="Messaging window"]');
chat.focus();
this.chatTarget.textContent = 'Chat online';
});
});
Expand Down

0 comments on commit 8b0cefb

Please sign in to comment.