u2ui 1.5.18 → 1.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/el/fields/fields.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
class Menu {
|
|
3
2
|
constructor(menuItem) {
|
|
4
3
|
this.menuItem = menuItem;
|
|
@@ -323,6 +322,9 @@ document.documentElement.addEventListener('contextmenu', e=>{
|
|
|
323
322
|
e.preventDefault();
|
|
324
323
|
|
|
325
324
|
rootEl.showPopover();
|
|
325
|
+
// pointerup still pending (not on Windows): capture it, so it does not light-dismiss the popover
|
|
326
|
+
if (e.buttons) rootEl.setPointerCapture(e.pointerId);
|
|
327
|
+
|
|
326
328
|
rootEl.querySelector('button').focus();
|
|
327
329
|
|
|
328
330
|
let top = e.clientY + 2;
|
|
@@ -402,8 +402,8 @@ its replacement, as a promise or directly. `surface` comes along rather than a
|
|
|
402
402
|
digest of it: `surface.config` says what the field allows — with `null` where
|
|
403
403
|
nothing is restricted — because an answer using anything else is cleaned away on
|
|
404
404
|
the way back in, and `surface.element` is where an application reads whatever
|
|
405
|
-
else its own fields carry; a rejection is shown
|
|
406
|
-
|
|
405
|
+
else its own fields carry; a rejection is shown as an alert
|
|
406
|
+
(`js/dialog`) and leaves the panes and the field untouched. `prompts` fills a datalist beside the
|
|
407
407
|
input. Without `diff` the dialog shows two panes — comparing two HTML strings is
|
|
408
408
|
a library question, not an editor one, so none is pulled in. Answers that arrive
|
|
409
409
|
after the next prompt, or after the dialog closed, are dropped.
|
package/js/rte/src/client/ai.js
CHANGED
|
@@ -148,7 +148,11 @@ async function ask(state) {
|
|
|
148
148
|
parts.apply.disabled = false;
|
|
149
149
|
await update(state, pending, run);
|
|
150
150
|
} catch (error) {
|
|
151
|
-
|
|
151
|
+
// A failure is no answer: it comes as an alert, and the panes keep what they had.
|
|
152
|
+
if (state.pending === pending && pending.run === run) {
|
|
153
|
+
const {alert} = await import('../../../dialog/dialog.js');
|
|
154
|
+
alert(String(error?.message ?? error), {root: state.dialog.parentNode});
|
|
155
|
+
}
|
|
152
156
|
} finally {
|
|
153
157
|
if (state.pending === pending && pending.run === run) parts.busy.disabled = false;
|
|
154
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "u2ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.19",
|
|
4
4
|
"description": "HTML Advanced: More Capabilities, Same Feel, Same Simplicity",
|
|
5
5
|
"keywords": ["web-components","pattern-library","component-library","ui-toolkit","design-system"],
|
|
6
6
|
"author": "Tobias Buschor",
|