Skip to content

Commit e2f824f

Browse files
authored
Merge pull request #1306 from drgrice1/update-npm-dependencies
Update third party npm dependencies.
2 parents 4716c37 + 44e506e commit e2f824f

File tree

5 files changed

+1436
-987
lines changed

5 files changed

+1436
-987
lines changed

htdocs/generate-assets.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
/* eslint-env node */
44

5-
const yargs = require('yargs');
5+
const yargs = require('yargs/yargs');
6+
const { hideBin } = require('yargs/helpers');
67
const chokidar = require('chokidar');
78
const path = require('path');
89
const { minify } = require('terser');
@@ -14,7 +15,7 @@ const postcss = require('postcss');
1415
const rtlcss = require('rtlcss');
1516
const cssMinify = require('cssnano');
1617

17-
const argv = yargs
18+
const argv = yargs(hideBin(process.argv))
1819
.usage('$0 Options')
1920
.version(false)
2021
.alias('help', 'h')

htdocs/js/GraphTool/graphtool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ window.graphTool = (containerId, options) => {
198198
}
199199

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

204204
gt.board.defaultAxes.x.defaultTicks.generateLabelText = generateLabelText;

htdocs/js/MathQuill/mqeditor.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,15 @@
550550
toolbarEnabled = !toolbarEnabled;
551551
localStorage.setItem('MQEditorToolbarEnabled', toolbarEnabled);
552552
if (!toolbarEnabled && answerQuill.toolbar) toolbarRemove();
553-
menu.hide();
553+
// Bootstrap tries to focus the triggering element after hiding the menu. However, the menu gets
554+
// disposed of and the hidden link which is the triggering element removed too quickly in the
555+
// hidden.bs.dropdown event, and that causes an exception. So ignore that exception so that the
556+
// answerQuill textarea is focused instead.
557+
try {
558+
menu.hide();
559+
} catch {
560+
/* ignore */
561+
}
554562
answerQuill.textarea.focus();
555563
},
556564
{ once: true }

0 commit comments

Comments
 (0)