Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
fixed: OC: The query view is truncated when viewing query from query …
Browse files Browse the repository at this point in the history
…table (#519)
  • Loading branch information
theywa committed Nov 29, 2021
1 parent a75f19d commit 43b94e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions widget/discrepancy-note/dn-widget.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Widget from 'enketo-core/src/js/widget';
import { getSiblingElements } from 'enketo-core/src/js/dom-utils';
import { getSiblingElements, MutationsTracker } from 'enketo-core/src/js/dom-utils';
import $ from 'jquery';
import { t } from '../../public/js/src/module/translator';
import settings from '../../public/js/src/module/settings';
Expand Down Expand Up @@ -623,7 +623,11 @@ class Comment extends Widget {
if ( window.innerHeight - this.linkedQuestion.offsetHeight < queryModal.offsetHeight ) {
queryModal.scrollIntoView( option );
} else {
this.linkedQuestion.scrollIntoView( option );
// https://github.com/OpenClinica/enketo-express-oc/issues/518
new MutationsTracker( this.element.closest( 'form' ) ).waitForQuietness()
.then( () => {
this.linkedQuestion.scrollIntoView( option );
} );
}
}

Expand Down

0 comments on commit 43b94e0

Please sign in to comment.