Skip to content

Commit

Permalink
Make sure initial settings of the menu are used for tab order, assist…
Browse files Browse the repository at this point in the history
…ive MML and renderer, which where not in sync with their menu setting after a reload. (mathjax/MathJax#2786)
  • Loading branch information
dpvc committed Feb 2, 2022
1 parent 611a48c commit 6666694
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ts/ui/menu/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ export class Menu {
this.initSettings();
this.mergeUserSettings();
this.initMenu();
this.applySettings();
}

/**
Expand Down Expand Up @@ -670,6 +671,17 @@ export class Menu {

/*======================================================================*/

/**
* Do what is needed to apply the initial user settings
*/
protected applySettings() {
this.setTabOrder(this.settings.inTabOrder);
this.document.options.enableAssistiveMml = this.settings.assistiveMml;
if (this.settings.renderer !== this.defaultSettings.renderer) {
this.setRenderer(this.settings.renderer);
}
}

/**
* @param {string} scale The new scaling value
*/
Expand Down

0 comments on commit 6666694

Please sign in to comment.