From d3f3914aded3abd65a53edd3de79845d12ea64d7 Mon Sep 17 00:00:00 2001 From: Keegan George Date: Mon, 17 Apr 2023 13:35:11 -0700 Subject: [PATCH] DEV: Add an offset mobile devices (#21119) --- .../javascripts/discourse/app/components/quote-button.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/quote-button.js b/app/assets/javascripts/discourse/app/components/quote-button.js index 86a04d13c73..ee429bf5b2a 100644 --- a/app/assets/javascripts/discourse/app/components/quote-button.js +++ b/app/assets/javascripts/discourse/app/components/quote-button.js @@ -59,6 +59,7 @@ export default Component.extend(KeyEnterEscape, { editPost: null, _popper: null, popperPlacement: "top-start", + popperOffset: [0, 3], _isFastEditable: false, _displayFastEditInput: false, @@ -199,6 +200,12 @@ export default Component.extend(KeyEnterEscape, { if (showAtEnd) { this.popperPlacement = "bottom-start"; + + if (isAndroid) { + this.popperOffset = [0, 25]; + } else { + this.popperOffset = [0, 15]; + } } // change the position of the button @@ -222,7 +229,7 @@ export default Component.extend(KeyEnterEscape, { { name: "offset", options: { - offset: [0, 3], + offset: this.popperOffset, }, }, ],