Skip to content

Commit 708e1bf

Browse files
committed
fix: fixed #2668
1 parent 62cd407 commit 708e1bf

File tree

4 files changed

+730
-736
lines changed

4 files changed

+730
-736
lines changed

CHANGELOG.md

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,51 +22,32 @@
2222

2323
### Resolved Issues
2424

25-
- **#2570** Fixed `\bf`, `\it`, and related text formatting commands not
26-
accepting braced arguments. Previously, commands like `\bf{425}` would fail to
27-
parse because the parser didn't handle braced arguments for `{:rest*}`
28-
deferred parameters. Additionally, the rendering system wasn't properly
29-
combining `fontFamily` with `fontSeries`/`fontShape` properties, causing
30-
`\bf{425}` to render in regular weight instead of bold. The parser now
31-
correctly handles braced arguments, and the `getFont()` method builds compound
32-
variant keys (e.g., 'roman-bold') by combining these style properties.
33-
- **#2619** Fixed placeholders in multi-row array environments (like
34-
`\displaylines`) not being focusable with pointer clicks. The hit-testing
35-
logic now properly determines which row was clicked before searching for
36-
atoms, ensuring placeholders in different rows can be correctly selected.
37-
Additionally, fixed prompt hit testing to include the full visual area
38-
(including padding) and corrected cursor positioning to place the cursor
39-
inside the prompt body rather than selecting around it.
40-
- **#2515** Fixed placeholders inside accent commands (`\vec{}`, `\bar{}`,
41-
`\hat{}`, etc.) not being clickable. When clicking on a placeholder wrapped
42-
in an accent command, the cursor now correctly positions inside the
43-
placeholder instead of selecting the entire accent atom.
44-
- **#2364** Fixed `--keycap-height` CSS custom property not working in sandboxed
45-
iframes. Previously, setting `--keycap-height` to custom values (e.g., 15px)
46-
had no effect because responsive breakpoint queries were using `max()`
47-
functions that enforced minimum height values. The custom property now
48-
properly accepts any user-defined value while maintaining sensible defaults
49-
(60px, 52px, 42px) when no custom value is provided.
25+
- **#2146** Fixed nested subscript and superscript creation. Previously, typing
26+
`a_b_` would select `b` instead of creating a subscript of `b`, and typing
27+
`a^b_` would create a subscript of `a` instead of `b`. The depth calculation
28+
functions now correctly count only subscript depth for subscripts and only
29+
superscript depth for superscripts, allowing proper nesting of scripts within
30+
scripts of different types.
5031
- **#2343** Fixed clipboard API errors when MathLive is used in sandboxed
5132
iframes. Previously, when pasting content in a mathfield embedded in a
5233
sandboxed iframe without `allow="clipboard-read; clipboard-write"`
5334
permissions, unhandled promise rejections would appear in the console
5435
("Permissions policy violation: The Clipboard API has been blocked"). The
5536
paste operation now gracefully handles clipboard API errors with appropriate
5637
user feedback.
38+
- **#2364** Fixed `--keycap-height` CSS custom property not working in sandboxed
39+
iframes. Previously, setting `--keycap-height` to custom values (e.g., 15px)
40+
had no effect because responsive breakpoint queries were using `max()`
41+
functions that enforced minimum height values. The custom property now
42+
properly accepts any user-defined value while maintaining sensible defaults
43+
(60px, 52px, 42px) when no custom value is provided.
5744
- **#2391** Fixed spacing for `\class`, `\cssId`, `\htmlId`, `\htmlData`,
5845
`\htmlStyle`, and `\href` commands. These commands now properly respect
5946
mathematical spacing rules, matching the behavior of similar commands like
6047
`\textcolor`. Previously, expressions like `1=\class{test}{1}` would not have
6148
proper spacing before the wrapped element, while `1=\textcolor{red}{1}` would.
6249
The commands now create atoms with the correct type (`mord`) and use deferred
6350
argument parsing to ensure proper inter-atom spacing.
64-
- **#2146** Fixed nested subscript and superscript creation. Previously, typing
65-
`a_b_` would select `b` instead of creating a subscript of `b`, and typing
66-
`a^b_` would create a subscript of `a` instead of `b`. The depth calculation
67-
functions now correctly count only subscript depth for subscripts and only
68-
superscript depth for superscripts, allowing proper nesting of scripts within
69-
scripts of different types.
7051
- **#2444** Font style menu items (roman, italic) are now always visible and
7152
properly toggleable. Previously, these items only appeared when text was
7253
selected, and toggling them when positioned after styled text would not work
@@ -99,19 +80,44 @@
9980
array around the math axis, which was causing unwanted spacing above inline
10081
arrays with column separators like
10182
`\begin{array}{l|l} a & b\\ c & d\end{array}`.
102-
- **#2572** Fixed typing special characters in placeholders. When typing
103-
characters with keybindings (like backslash, parentheses, brackets) in a
104-
selected placeholder, the characters would disappear or trigger unwanted
105-
behaviors. The placeholder is now deleted before keystroke processing,
106-
allowing all keybindings and character handling to work correctly.
83+
- **#2515** Fixed placeholders inside accent commands (`\vec{}`, `\bar{}`,
84+
`\hat{}`, etc.) not being clickable. When clicking on a placeholder wrapped
85+
in an accent command, the cursor now correctly positions inside the
86+
placeholder instead of selecting the entire accent atom.
10787
- **#2547** Fixed rendering of `\colorbox` in fractions where the colored
10888
background would obscure the fraction bar. The background is now rendered
10989
behind the content using a CSS pseudo-element with `z-index: -1`, preventing
11090
it from painting over adjacent elements like fraction bars. This issue
11191
occurred specifically with double-braced content like
11292
`\frac{{\colorbox{red}{344}}}{3}`.
93+
- **#2570** Fixed `\bf`, `\it`, and related text formatting commands not
94+
accepting braced arguments. Previously, commands like `\bf{425}` would fail to
95+
parse because the parser didn't handle braced arguments for `{:rest*}`
96+
deferred parameters. Additionally, the rendering system wasn't properly
97+
combining `fontFamily` with `fontSeries`/`fontShape` properties, causing
98+
`\bf{425}` to render in regular weight instead of bold. The parser now
99+
correctly handles braced arguments, and the `getFont()` method builds compound
100+
variant keys (e.g., 'roman-bold') by combining these style properties.
101+
- **#2572** Fixed typing special characters in placeholders. When typing
102+
characters with keybindings (like backslash, parentheses, brackets) in a
103+
selected placeholder, the characters would disappear or trigger unwanted
104+
behaviors. The placeholder is now deleted before keystroke processing,
105+
allowing all keybindings and character handling to work correctly.
106+
- **#2619** Fixed placeholders in multi-row array environments (like
107+
`\displaylines`) not being focusable with pointer clicks. The hit-testing
108+
logic now properly determines which row was clicked before searching for
109+
atoms, ensuring placeholders in different rows can be correctly selected.
110+
Additionally, fixed prompt hit testing to include the full visual area
111+
(including padding) and corrected cursor positioning to place the cursor
112+
inside the prompt body rather than selecting around it.
113113
- **#2665** Clicking on a mathfield now only fires focus events once, instead of
114114
generating duplicate focus/blur/focusin/focusout events.
115+
- **#2668** Fixed right-click context menu causing MathField to lose focus when
116+
clicking on formatted text. Previously, right-clicking on equation text would
117+
blur the field, potentially causing incorrect rendering when selecting menu
118+
options like color changes. The context menu event is now prevented before
119+
showing the menu, ensuring focus is maintained regardless of where the
120+
right-click occurs.
115121
- **#2686** When deleting a range that includes special mathematical atoms like
116122
`\sqrt`, `\frac`, or `\enclose`, the special atom structure is now properly
117123
removed or cleaned up. Previously, deleting content would leave behind empty

0 commit comments

Comments
 (0)