diff --git a/src/AnnotationDialog.js b/src/AnnotationDialog.js index 7394d12ed..25bbcb404 100644 --- a/src/AnnotationDialog.js +++ b/src/AnnotationDialog.js @@ -483,7 +483,7 @@ class AnnotationDialog extends EventEmitter { } else { const dataType = util.findClosestDataType(event.target); if (dataType === CLASS_REPLY_TEXTAREA) { - this.activateReply(); + this.scrollToLastComment(); } } } diff --git a/src/MobileAnnotator.scss b/src/MobileAnnotator.scss index 46dcac8fc..455f16cd6 100644 --- a/src/MobileAnnotator.scss +++ b/src/MobileAnnotator.scss @@ -92,6 +92,7 @@ overflow-y: auto; padding: 15px; position: absolute; + top: 48px; width: 100%; } @@ -102,6 +103,8 @@ height: 48px; justify-content: space-between; padding: 0; + position: absolute; + top: 0; width: 100%; z-index: 160; diff --git a/src/__tests__/AnnotationDialog-test.js b/src/__tests__/AnnotationDialog-test.js index 449e464ee..735f002af 100644 --- a/src/__tests__/AnnotationDialog-test.js +++ b/src/__tests__/AnnotationDialog-test.js @@ -544,15 +544,15 @@ describe('AnnotationDialog', () => { expect(stubs.hide).to.be.called; }); - it('should activate the reply area when user presses another key inside the reply area', () => { - stubs.activate = sandbox.stub(dialog, 'activateReply'); + it('should scroll to the bottom area when user presses a key inside the reply area', () => { + stubs.scrollToLastComment = sandbox.stub(dialog, 'scrollToLastComment'); dialog.keydownHandler({ key: ' ', // space target: dialog.element.querySelector(`.${CLASS_REPLY_TEXTAREA}`), stopPropagation: () => {} }); - expect(stubs.activate).to.be.called; + expect(stubs.scrollToLastComment).to.be.called; }); });