简体   繁体   中英

Facebook Customer Chat Plugin Auto Scroll to bottom

Recenlty i have included Facebook Customer Chat Plugin https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin in my website and it is working fine except, once a user login to facebook chat plugin and reload the same page or go to any other pages of website where this chat plugin is enabled, the page automatically scroll to bottom, this problem only occurs in Google Chrome ;_;

you can check this out here url https://www.coderare.com/

After much trial and error I found it was the anchor tag within Facebook's "iframe src:...", and also the problem is limited to Chrome, anyway here's the fix:

.fb_dialog, .fb_reset {position: fixed !important;z-index: 10000 !important;}

You may not need the z-index, but included it as I needed it

Hope this helps as it has driven me insane! Not the most elegant solution but it works and avoids a lot of JS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM