This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d63e789f25 [fix] let Ask Me modal close after the first question 
(#3702)
0d63e789f25 is described below

commit 0d63e789f25c26d5e1ff74cf5f877e23a6edb1f1
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Tue May 19 18:42:20 2026 -0700

    [fix] let Ask Me modal close after the first question (#3702)
    
    After the first question the Kapa widget flips its Mantine modal to
    `keepMounted: true`, and Mantine then hides a closed keep-mounted modal
    by writing `style="display: none"` inline on the content section. Our
    `.mantine-Modal-content { display: flex !important; flex-direction:
    column !important }` overrides won that cascade and pinned the modal
    visible even after onClose fired. From there every subsequent X / Esc /
    overlay click hit `useDisclosure.close()` with state already `false` and
    silently became a no-op. Drop those two declarations — Kapa already sets
    `display: flex; flex-direction: column` inline via Mantine `sx`, so the
    flex layout still applies and Mantine transition can now hide the modal
    correctly.
    
    Co-authored-by: Claude Opus 4.7 <[email protected]>
---
 static/js/custom-script.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/static/js/custom-script.js b/static/js/custom-script.js
index 86459ab3cb9..f98227d45e5 100644
--- a/static/js/custom-script.js
+++ b/static/js/custom-script.js
@@ -31,10 +31,16 @@
         'padding-bottom:2rem !important;' +
         '--modal-y-offset:0 !important;' +
         '}' +
+        // Do NOT add `display:flex !important` here — Kapa already sets
+        // `display:flex; flex-direction:column` inline via Mantine's `sx`
+        // prop, and overriding with `!important` would also override the
+        // `display:none` Mantine's transition writes inline when the modal
+        // is keep-mounted and closed (which happens after the first
+        // question). That kept the modal visible after onClose fired,
+        // making X / Esc / overlay-click all silently fail on the second
+        // attempt.
         '.mantine-Modal-content{' +
         'max-height:calc(100vh - 80px - 2rem) !important;' +
-        'display:flex !important;' +
-        'flex-direction:column !important;' +
         '}' +
         '.mantine-Modal-body{' +
         'flex:1 1 auto !important;' +


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to