Problem: ingredient modal's closeModal called history.back(), which triggered recipe editor's popHandler → closed recipe editor too. Fix: modal suspend/resume system. - When sub-modal opens, parent modal's popHandler is suspended - When sub-modal closes, parent is resumed - Parent popHandler ignores popstate events while suspended - closeModal resumes parent before calling history.back() Also: closeModal now pops exactly 1 history entry (not _historyDepth). The _historyDepth counter tracks fullscreen entries within the modal, which are handled by popHandler's decrements. closeModal only needs to pop the modal's own base entry. |
||
|---|---|---|
| .. | ||
| css | ||
| data | ||
| js | ||
| lib | ||
| index.html | ||