Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tippy: Append tooltips to the parent of the `reference`.
Aman Agrawal489daa7f7ccb
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex c929b20a7a6..8d995a2769f 100644--- a/static/js/click_handlers.js+++ b/static/js/click_handlers.js@@ -574,6 +574,7 @@ export function initialize() {observer = new MutationObserver(callback);observer.observe(target_node, config);},+ appendTo: () => document.body,});}diff --git a/static/js/tippyjs.js b/static/js/tippyjs.jsindex df933e01f84..58cf81f7731 100644--- a/static/js/tippyjs.js+++ b/static/js/tippyjs.js@@ -26,6 +26,10 @@ tippy.setDefaultProps({// devices.touch: ["hold", 750],+ // This has the side effect of some properties of parent applying to+ // tooltips.+ appendTo: "parent",+// html content is not supported by default// enable it by passing data-tippy-allowHtml="true"// in the tag or a parameter.diff --git a/static/styles/zulip.css b/static/styles/zulip.cssindex 8d997bfb8eb..841b1537012 100644--- a/static/styles/zulip.css+++ b/static/styles/zulip.css@@ -829,6 +829,12 @@ td.pointer {}}+ /* Tooltips should not follow the width restrictions of their parent element. */+ [data-tippy-root] {+ width: max-content;+ word-wrap: unset;+ }+> .reaction_button {display: inline-block;position: relative;