Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions htdocs/generate-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

/* eslint-env node */

const yargs = require('yargs');
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const chokidar = require('chokidar');
const path = require('path');
const { minify } = require('terser');
Expand All @@ -14,7 +15,7 @@ const postcss = require('postcss');
const rtlcss = require('rtlcss');
const cssMinify = require('cssnano');

const argv = yargs
const argv = yargs(hideBin(process.argv))
.usage('$0 Options')
.version(false)
.alias('help', 'h')
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/Feedback/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// Make a click on the popover header close the popover.
feedbackPopover.tip?.querySelector('.btn-close')?.addEventListener('click', () => feedbackPopover.hide());

if (feedbackPopover.tip) feedbackPopover.tip.dataset.iframeHeight = '1';
if (feedbackPopover.tip) feedbackPopover.tip.dataset.iframeSize = '1';

const revealCorrectBtn = feedbackPopover.tip?.querySelector('.reveal-correct-btn');
if (revealCorrectBtn && feedbackPopover.correctRevealed) {
Expand Down
4 changes: 2 additions & 2 deletions htdocs/js/GraphTool/graphtool.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ window.graphTool = (containerId, options) => {
}

if (this.visProp.useunicodeminus) labelText = labelText.replace(/-/g, '\u2212');
return addTeXDelims ?? this.visProp.label.usemathjax ? `\\(${labelText}\\)` : labelText;
return (addTeXDelims ?? this.visProp.label.usemathjax) ? `\\(${labelText}\\)` : labelText;
};

gt.board.defaultAxes.x.defaultTicks.generateLabelText = generateLabelText;
Expand Down Expand Up @@ -1780,7 +1780,7 @@ window.graphTool = (containerId, options) => {
if (!gt.helpEnabled) gt.messageBox.classList.add('gt-disabled-help');
gt.messageBox.setAttribute('role', 'region');
gt.messageBox.setAttribute('aria-live', 'polite');
gt.messageBox.dataset.iframeHeight = '1';
gt.messageBox.dataset.iframeSize = '1';
gt.graphContainer.append(gt.messageBox);
gt.messageBox.addEventListener('keydown', (e) => {
if (e.key === 'Escape') gt.confirm.dispose?.(e);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/Knowls/knowl.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'modal-dialog-centered',
'modal-dialog-scrollable'
);
knowlDialog.dataset.iframeHeight = '1';
knowlDialog.dataset.iframeSize = '1';
knowl.knowlModal.append(knowlDialog);

const knowlContent = document.createElement('div');
Expand Down
10 changes: 9 additions & 1 deletion htdocs/js/MathQuill/mqeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,15 @@
toolbarEnabled = !toolbarEnabled;
localStorage.setItem('MQEditorToolbarEnabled', toolbarEnabled);
if (!toolbarEnabled && answerQuill.toolbar) toolbarRemove();
menu.hide();
// Bootstrap tries to focus the triggering element after hiding the menu. However, the menu gets
// disposed of and the hidden link which is the triggering element removed too quickly in the
// hidden.bs.dropdown event, and that causes an exception. So ignore that exception so that the
// answerQuill textarea is focused instead.
try {
menu.hide();
} catch {
/* ignore */
}
answerQuill.textarea.focus();
},
{ once: true }
Expand Down
Loading