]> BookStack Code Mirror - bookstack/commit
Refreshed markdown cm instance layout on size change
authorDan Brown <redacted>
Mon, 24 Jan 2022 22:08:36 +0000 (22:08 +0000)
committerDan Brown <redacted>
Mon, 24 Jan 2022 22:08:36 +0000 (22:08 +0000)
commitaaa2205df1055a02243c1fe3c191dbe411e8290a
treea1d9a84fa429077494e6b003c6457051ecf50fde
parent4aed3f8558c429d95bdc8a987d72a6a9f6df7267
Refreshed markdown cm instance layout on size change

Intended to fix positioning quirks caused by changing codemirror
instance size when you have lines that wrap and cause line height
changes. Often caused by editor toolbox expand/collapse.

This adds a debounced resize observer to refresh editor layout on size
change.
Also tweaks toolbox expand/collapse to more consistently set aria
attribute.

For #3186
resources/js/components/editor-toolbox.js
resources/js/components/markdown-editor.js