From 51f032c87e6643a30ad6b4d14e2d72cb827be474 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 21 Dec 2023 18:19:25 -0600 Subject: [PATCH] Website: Hide chatbot button on mobile devices (#15790) Closes: https://github.com/fleetdm/confidential/issues/4757 Changes: - Updated layout.less to hide the website chat button when the chat is closed on screen sizes <575px. (The chat can still be opened on mobile devices by clicking a "talk to an expert" button) --- website/assets/styles/layout.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/assets/styles/layout.less b/website/assets/styles/layout.less index de88b18dcf..4f86b1a52a 100644 --- a/website/assets/styles/layout.less +++ b/website/assets/styles/layout.less @@ -409,6 +409,15 @@ body.detected-mobile { height: 371px; } } + // For hiding the hubspot chat widget on mobile devices. + #hubspot-messages-iframe-container iframe[aria-label='Chat Widget'] { + display: none !important;//lesshint-disable-line importantRule + } + html.hs-messages-widget-open, html.hs-messages-mobile.hs-messages-widget-open {// Shows the hubspot chat widget when the widget is opened from a "Talk to an expert" button. + #hubspot-messages-iframe-container iframe[aria-label='Chat Widget'] { + display: initial !important;//lesshint-disable-line importantRule + } + } } @media (max-width: 490px) {