RocketChat/Rocket.Chat.Livechat

maximizeWidget() does not maximize when livechat was triggered

Open

#560 建立於 2021年3月9日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (222 fork)auto 404
good first issue

倉庫指標

Star
 (246 star)
PR 合併指標
 (PR 指標待抓取)

描述

First, thanks for this awesome software!

It would be nice to have the widget to be shown and fully open when calling this.maximizeWidget() and the widget was triggered with a message was simulated to be sent from the agent/bot

So when we have a situation like this: image

calling, externally:

RocketChat(function() {
    this.maximizeWidget();
});

should bring the widget to this:

image

As a bonus... heheh after this.maximizeWidget or when pressing the $([class^="trigger-message__link-reply"]) (yes, jquery, sorry), the focus should be put automatically.

So after those events, the user would be able to start writing right away, instead of having to click at the input form.

For those using this Widget with trigger, you can emulate the click, like:

$([class^="trigger-message__link-reply"]).click()

in order to simulate the "START CHAT" "Iniciar Chat" button.

貢獻者指南