Prevent quote preview from going offscreen in cases of limited screen width.
This commit is contained in:
parent
d0647e3784
commit
4122bce308
@ -356,7 +356,7 @@ hover = (e) ->
|
|||||||
threshold = @clientWidth / 2
|
threshold = @clientWidth / 2
|
||||||
threshold = Math.max threshold, @clientWidth - 400 unless @isImage
|
threshold = Math.max threshold, @clientWidth - 400 unless @isImage
|
||||||
marginX = (if clientX <= threshold then clientX else @clientWidth - clientX) + 45
|
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'
|
marginX += 'px'
|
||||||
[left, right] = if clientX <= threshold then [marginX, ''] else ['', marginX]
|
[left, right] = if clientX <= threshold then [marginX, ''] else ['', marginX]
|
||||||
|
|
||||||
|
|||||||
@ -1286,6 +1286,9 @@ span.hide-announcement {
|
|||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 1px 2px !important;
|
padding: 1px 2px !important;
|
||||||
}
|
}
|
||||||
|
#qp {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
#qp > .opContainer::after {
|
#qp > .opContainer::after {
|
||||||
content: '';
|
content: '';
|
||||||
clear: both;
|
clear: both;
|
||||||
@ -1295,6 +1298,7 @@ span.hide-announcement {
|
|||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 2px 2px 5px;
|
padding: 2px 2px 5px;
|
||||||
|
max-width: 50px;
|
||||||
}
|
}
|
||||||
#qp img {
|
#qp img {
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user