Scroll to Recent Message stopped working after pressing 'Esc' or `Close` and reopen

Hello All,

I am facing one strange issue that bot is not working appropriately after closing with button or esc key.

as a part of configuration i have make it fullscreen by using ‘mergeconfig’ options and recentmessage histrory timeout option has been set to 1 sec.

i don’t know if its relevant or not. and another thing i am using botpress version ‘12.3.2’.

any Idea how to fix it?

I did fix it by my self.

Add one event hook.

window.addEventListener('message', function(event) {    
      if (event.data.name === 'webchatOpened' || event.data.message_type==="session_reset"){
var iframe=$($("iframe")[0].contentWindow.document);
iframe.find(".bpw-msg-list").animate({scrollTop:iframe.find(".bpw-msg-list").prop("scrollHeight")}, 1000);
}
});

I did put this code in that same file where i am embedding chat-bot.

Hi there,

a fix has been added to cover workaround that used a setTimeout, in some cases the webchat wasn’t scrolling to bottom properly when the window resized. So what you’re telling me is that when you close the webchat, then re-open it, the webchat stops scrolling to recent messages ?

Please let me know what browser you’re using with its version please. Furthermore, let me know if this happens from time to time or it happens consistently.

Thanks

Hello EFF,

Yes you got it correctly when i do close and reopen the conversation window after making it full screen. I type one message than message will appear and whatever reply made by bot scroll do not happened properly.
I mean i have set one card and one text box as a reply by bot. and scroll just scroll down till half of the card than user needs to scroll down it manually.
its been also happening when i do show single choice option.
I am using botpress 12.3.2 and issue has been observed in both of the browser mozila firefox 72 and chrome 79.39 .
and with regarding to time to time it was happening almost all time when i clear cache and refresh and reopen. and also happened without reopen if developer tools open and close.
after addling the line i mentioned its been fixed all scenario.

thanks.

I just realized that the fix I’m talking about has been released in botpress 12.4.2 please update and let me know how it goes

hello @EFF
i did update botpress to mentioned version and Yes its scrolling now properly but strange that in emulator now i am not able to see debugger any change you made to see the debbuger?

its now taking whole space of debugger.

That’s very strange, I never encountered this issue yet

@EFF this issue rise after i create around 180 intent in NLU module by importing older version bot.
and recently i move to botpress 12.5 and same thing has been repeated once again as well.