Commit 4c1449b
committed
fix: pinned md preview switches when opening another file
When md viewer is pinned and user switches to another md or HTML file,
the preview would switch instead of staying pinned. Two fixes:
- _loadMdviewrPreview: check urlPinned before activating MarkdownSync
on a new document when md viewer is already active
- _activeDocChanged: skip openLivePreview when md viewer is pinned to
prevent HTML LP iframe from replacing the pinned md viewer
Update pin test to cover md→HTML and md→md switches with negative
assertions verifying the pinned preview stays visible.1 parent e4131b4 commit 4c1449b
2 files changed
Lines changed: 28 additions & 4 deletions
File tree
- src/extensionsIntegrated/Phoenix-live-preview
- test/spec
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
879 | 883 | | |
880 | 884 | | |
881 | 885 | | |
| |||
1160 | 1164 | | |
1161 | 1165 | | |
1162 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1163 | 1171 | | |
1164 | 1172 | | |
1165 | 1173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1764 | 1764 | | |
1765 | 1765 | | |
1766 | 1766 | | |
1767 | | - | |
| 1767 | + | |
1768 | 1768 | | |
1769 | 1769 | | |
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
| 1773 | + | |
1773 | 1774 | | |
1774 | 1775 | | |
1775 | | - | |
1776 | 1776 | | |
1777 | 1777 | | |
1778 | | - | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1779 | 1785 | | |
1780 | | - | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1781 | 1797 | | |
1782 | 1798 | | |
1783 | 1799 | | |
| |||
0 commit comments