Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

popover: Fixed color-picker popover responsiveness.

aryanshridharc591141d7c59
diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js
index e4f491ef31f..2ff6c96f2b5 100644
--- a/static/js/stream_popover.js
+++ b/static/js/stream_popover.js
@@ -470,6 +470,10 @@ exports.register_stream_handlers = function () {
$(".streams_popover").on("click", "a.sp-cancel", () => {
exports.hide_stream_popover();
});
+ if ($(window).width() <= 768) {
+ $(".popover-inner").hide().fadeIn(300);
+ $(".popover").addClass("colorpicker-popover");
+ }
});
};
diff --git a/static/styles/popovers.css b/static/styles/popovers.css
index d72d950db05..070a5c914f1 100644
--- a/static/styles/popovers.css
+++ b/static/styles/popovers.css
@@ -379,6 +379,39 @@ ul {
}
}
+ .colorpicker-popover {
+ display: flex !important;
+ justify-content: center;
+ align-items: center;
+
+ /* these are to override JS embedded inline styles. */
+ top: 0 !important;
+ left: 0 !important;
+ margin: 0 !important;
+ width: 100%;
+ height: 100%;
+
+ background-color: hsla(0, 0%, 0%, 0.7);
+ border-radius: 0;
+ border: none;
+
+ pointer-events: none;
+
+ .popover-inner {
+ background-color: hsl(0, 0%, 100%);
+ pointer-events: all;
+ }
+
+ @media (max-width: 500px) {
+ .popover-inner {
+ width: 70%;
+ }
+ .sp-picker-container {
+ border-left: none !important;
+ }
+ }
+ }
+
.popover-flex {
position: absolute;
top: 0 !important;