From 4122bce3084f8fc25b5f0dc2e42f999f7d9430a5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 22 Mar 2019 07:27:10 -0700 Subject: [PATCH] Prevent quote preview from going offscreen in cases of limited screen width. --- src/General/UI.coffee | 2 +- src/css/style.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 388aea7c4..24d6c71cc 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -356,7 +356,7 @@ hover = (e) -> threshold = @clientWidth / 2 threshold = Math.max threshold, @clientWidth - 400 unless @isImage marginX = (if clientX <= threshold then clientX else @clientWidth - clientX) + 45 - marginX = Math.min(marginX, @clientWidth - width) if @isImage + marginX = Math.min(marginX, @clientWidth - width) marginX += 'px' [left, right] = if clientX <= threshold then [marginX, ''] else ['', marginX] diff --git a/src/css/style.css b/src/css/style.css index 29da2b593..01131a5c1 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -1286,6 +1286,9 @@ span.hide-announcement { margin: 0 !important; padding: 1px 2px !important; } +#qp { + pointer-events: none; +} #qp > .opContainer::after { content: ''; clear: both; @@ -1295,6 +1298,7 @@ span.hide-announcement { border: none; margin: 0; padding: 2px 2px 5px; + max-width: 50px; } #qp img { max-height: 80vh;