FlowiseAI / FlowiseChatEmbed

276 stars 1.17k forks source link

Option not to focus on input mount #181

Closed yhranik-vp closed 3 weeks ago

yhranik-vp commented 1 month ago

Hello,

I'm using a standalone (flowise-fullchatbot) chat widget and, by default, it triggers input focus on component mount. This results in automatically scrolling to that element on the page, which is unwanted behavior in my case.

I'd love to be able to opt-out of the default input focus.

HenryHengZJ commented 3 weeks ago

added a new property autoFocus that you can turn on/off the focus

HenryHengZJ commented 3 weeks ago
Chatbot.init({
      chatflowid: '123',
      apiHost: 'http://localhost:3000',
      theme: {
        chatWindow: {
          textInput: {
              autoFocus: false
          },
        }
      }
    });
HenryHengZJ commented 3 weeks ago

Released in v1.3.3!