mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Improve quoting on iOS
Fixes quote usability on iOS when the button is near the right edge of the screen.
This commit is contained in:
parent
a7301c8671
commit
4fa1ef0945
@ -107,10 +107,13 @@ export default Ember.Component.extend({
|
||||
let left = markerOffset.left + Math.max(0, parentScrollLeft);
|
||||
|
||||
if (showAtEnd) {
|
||||
top = top + 20;
|
||||
const nearRightEdgeOfScreen =
|
||||
$(window).width() - $quoteButton.outerWidth() < left + 10;
|
||||
|
||||
top = nearRightEdgeOfScreen ? top + 50 : top + 20;
|
||||
left = Math.min(
|
||||
left + 10,
|
||||
$(window).width() - $quoteButton.outerWidth()
|
||||
$(window).width() - $quoteButton.outerWidth() - 10
|
||||
);
|
||||
} else {
|
||||
top = top - $quoteButton.outerHeight() - 5;
|
||||
|
Loading…
Reference in New Issue
Block a user