diff --git a/addon/data/selector-ui.js b/addon/data/selector-ui.js index 93f0b06ac4..a341d2c32d 100644 --- a/addon/data/selector-ui.js +++ b/addon/data/selector-ui.js @@ -316,6 +316,11 @@ const ui = (function () { // eslint-disable-line no-unused-vars } else { this.el.classList.remove("pageshot-small-selection"); } + if (docHeight - pos.bottom < 50) { + this.el.classList.add("pageshot-bottom-selection"); + } else { + this.el.classList.remove("pageshot-bottom-selection"); + } this.el.style.top = (pos.top - bodyRect.top) + "px"; this.el.style.left = (pos.left - bodyRect.left) + "px"; this.el.style.height = (pos.bottom - pos.top - bodyRect.top) + "px"; diff --git a/static/css/inline-selection.scss b/static/css/inline-selection.scss index 7f21e7f954..de9f4184c8 100644 --- a/static/css/inline-selection.scss +++ b/static/css/inline-selection.scss @@ -42,6 +42,10 @@ $overlay-z-index: 9999999999; bottom: -55px; right: 0; z-index: 6; + + .pageshot-bottom-selection & { + bottom: 5px; + } } .pageshot-highlight-button-cancel {