Skip to content

Commit b71c4fb

Browse files
committed
Update third party npm dependencies.
The following dependencies are updated: * jsxgraph: 1.10.1 -> 1.11.1 * plotly.js-dist-min: 2.23.0 -> 3.1.0 * sortablejs: 1.15.2 -> 1.15.6 * autoprefixer: 10.4.19 -> 10.4.21 * chokidar: 3.6.0 -> 4.0.3 * cssnano: 6.1.2 -> 7.1.0 * postcss: 8.4.38 -> 8.5.6 * prettier: 3.2.5 -> 3.6.2 * rtlcss: 4.1.1 -> 4.3.0 * sass: 1.75.0 -> 1.90.0 * terser: 5.30.4 -> 5.43.1 * yargs: 17.7.2 -> 18.0.0 All libraries are now at their latest version. Note that the only change to the PG code required is a minor change to the generate-assets.js script due to a change in the usage of yargs.
1 parent 76aa578 commit b71c4fb

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)