mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-10-01 09:19:34 +05:30
fix(flowchart): replace window.prompt/confirm with inline modal in standalone window; v4.9.9
Electron renderer contexts return undefined from window.prompt/window.confirm, so shape change, edge kind, edge label, and reset confirmation did nothing. Bundle now ships promptInline/confirmInline (custom DOM overlay modals) and uses them in onEdgeClick / onShapeMenu / reset handler. Exposed as window.FlowchartModals for jsdom tests. Amit Haridas
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# PanConverter - Updates & Changelog
|
||||
|
||||
## Version 4.9.9 (2026-09-15)
|
||||
|
||||
### Fix
|
||||
- **Standalone Flowchart Generator window: replaced broken `window.prompt` / `window.confirm` with an inline DOM-modal dialog.** Electron renderer contexts (the BrowserWindow hosting the standalone window) return `undefined` when `window.prompt(...)` or `window.confirm(...)` is called — meaning every shape menu, edge-kind change, edge-label edit, and reset confirmation silently did nothing. The bundle now ships two helpers (`promptInline`, `confirmInline`) that build a small overlay with a styled title, message, OK / Cancel buttons, and Enter / Escape / backdrop-click handling. The four call sites (`onEdgeClick` for kind + label, `onShapeMenu`, and the Reset click handler) are now `async` and await the helpers.
|
||||
- New `window.FlowchartModals = { promptInline, confirmInline }` export on the bundle so jsdom tests can drive the modals directly without rebuilding the IIFE.
|
||||
- 6 new tests in `tests/flowchart-controller.test.js` — OK / Cancel / Escape resolution paths for `promptInline`, OK / Cancel for `confirmInline`, and the `danger` flag renders a red "Delete" primary button.
|
||||
|
||||
## Version 4.9.8 (2026-09-15)
|
||||
|
||||
### Fix
|
||||
|
||||
Reference in New Issue
Block a user