File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 37
37
if ( input . classList . contains ( 'partially-correct' ) ) answerQuill . classList . add ( 'partially-correct' ) ;
38
38
39
39
// Find the feedback button for this input if there is one on the page.
40
- const feedbackBtn = Array . from ( document . querySelectorAll ( `button[data-answer-labels]` ) ) . find ( ( btn ) =>
40
+ answerQuill . feedbackBtn = Array . from ( document . querySelectorAll ( `button[data-answer-labels]` ) ) . find ( ( btn ) =>
41
41
JSON . parse ( btn . dataset . answerLabels ) . includes ( answerLabel )
42
42
) ;
43
43
269
269
answerQuill . latexInput . value = '' ;
270
270
}
271
271
272
- // If the feedback popover is open, then update its position.
273
- if ( feedbackBtn ) bootstrap . Popover . getInstance ( feedbackBtn ) ?. update ( ) ;
272
+ // If any feedback popovers are open, then update their positions.
273
+ for ( const quill of Object . keys ( window . answerQuills ) ) {
274
+ if ( window . answerQuills [ quill ] . feedbackBtn )
275
+ bootstrap . Popover . getInstance ( window . answerQuills [ quill ] . feedbackBtn ) ?. update ( ) ;
276
+ }
274
277
} ;
275
278
276
279
input . after ( answerQuill ) ;
You can’t perform that action at this time.
0 commit comments