diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index b61f38bcc7..915e6d8e68 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -163,12 +163,12 @@ define([ autoScrollToEditButtons: function () { var button = $('#id-comments-change'), // TODO: add to cache btnBounds = null, - contentBounds = this.el.getBoundingClientRect(), + contentBounds = Common.Utils.getBoundingClientRect(this.el), moveY = 0, padding = 7; if (button.length) { - btnBounds = button.get(0).getBoundingClientRect(); + btnBounds = Common.Utils.getBoundingClientRect(button.get(0)); if (btnBounds && contentBounds) { moveY = contentBounds.bottom - (btnBounds.bottom + padding); if (moveY < 0) { diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 0126ccbda8..d4439a52fc 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -764,7 +764,7 @@ define([ sdkBoundsTopPos = 0; if (commentsView && arrowView && editorView && editorView.get(0)) { - editorBounds = editorView.get(0).getBoundingClientRect(); + editorBounds = Common.Utils.getBoundingClientRect(editorView.get(0)); if (editorBounds) { sdkBoundsHeight = editorBounds.height - this.sdkBounds.padding * 2; @@ -886,11 +886,11 @@ define([ commentsView.css({height: '100%'}); - contentBounds = commentsView.get(0).getBoundingClientRect(); + contentBounds = Common.Utils.getBoundingClientRect(commentsView.get(0)); if (contentBounds) { editorView = $('#editor_sdk'); if (editorView && editorView.get(0)) { - editorBounds = editorView.get(0).getBoundingClientRect(); + editorBounds = Common.Utils.getBoundingClientRect(editorView.get(0)); if (editorBounds) { sdkBoundsHeight = editorBounds.height - this.sdkBounds.padding * 2; sdkBoundsTopPos = sdkBoundsTop; @@ -1176,12 +1176,12 @@ define([ autoScrollToEditButtons: function () { var button = $('#id-comments-change-popover'), // TODO: add to cache btnBounds = null, - contentBounds = this.$window[0].getBoundingClientRect(), + contentBounds = Common.Utils.getBoundingClientRect(this.$window[0]), moveY = 0, padding = 7; if (button.length) { - btnBounds = button.get(0).getBoundingClientRect(); + btnBounds = Common.Utils.getBoundingClientRect(button.get(0)); if (btnBounds && contentBounds) { moveY = contentBounds.bottom - (btnBounds.bottom + padding); if (moveY < 0) {