Commit 7df8cb5
committed
feat(live-preview): forward iframe keys to Phoenix only in design mode
Outside design mode the previewed page kept its own keyboard shortcuts
captured by RemoteFunctions, which broke interactive previews. Now:
- Push designMode into the iframe config (initialized at boot, updated
via EVENT_WORKSPACE_DESIGN_MODE_CHANGE) so RemoteFunctions can gate.
- Move the forwarder from document-bubble to window-bubble registered
inside the load handler, so it runs as late as the DOM event flow
allows. Previewed-page handlers get first crack and we honor
defaultPrevented.
- Skip forwarding entirely in popped-out (non-embedded) preview windows
via __PHOENIX_EMBED_INFO; default to false until embed status is
confirmed.1 parent fde2ec8 commit 7df8cb5
2 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1578 | 1578 | | |
1579 | 1579 | | |
1580 | 1580 | | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1581 | 1593 | | |
1582 | 1594 | | |
1583 | 1595 | | |
| |||
1600 | 1612 | | |
1601 | 1613 | | |
1602 | 1614 | | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
1603 | 1626 | | |
1604 | 1627 | | |
1605 | | - | |
1606 | 1628 | | |
1607 | 1629 | | |
1608 | 1630 | | |
| |||
1614 | 1636 | | |
1615 | 1637 | | |
1616 | 1638 | | |
1617 | | - | |
| 1639 | + | |
1618 | 1640 | | |
1619 | 1641 | | |
1620 | 1642 | | |
1621 | 1643 | | |
| 1644 | + | |
1622 | 1645 | | |
1623 | 1646 | | |
1624 | 1647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
263 | 270 | | |
264 | 271 | | |
265 | 272 | | |
266 | 273 | | |
267 | 274 | | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
| 278 | + | |
| 279 | + | |
270 | 280 | | |
271 | 281 | | |
272 | 282 | | |
| |||
0 commit comments