[PR #1790] [CLOSED] Code block display in details tag #5889

Closed
opened 2026-02-05 10:19:37 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/1790
Author: @james-geiger
Created: 11/19/2019
Status: Closed

Base: masterHead: fix-781


📝 Commits (1)

  • b30738a update code.js to display properly in summary

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 resources/js/services/code.js (+5 -1)

📄 Description

Fixes #781. Use codemirror display/autoReload addon to watch for state changes and resize the codemirror blocks if they were hidden when the DOM was loaded.

This is done by polling every 250 milliseconds (you can pass a value like {delay: 500} as the option value to configure this).

codemirror docs

I've set this to poll every 50ms, which was a bit smoother transition. A 1ms poll, just for fun, produced the best result but is likely to cause performance issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/1790 **Author:** [@james-geiger](https://github.com/james-geiger) **Created:** 11/19/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-781` --- ### 📝 Commits (1) - [`b30738a`](https://github.com/BookStackApp/BookStack/commit/b30738a124ac9a0b77759a5aa3476a3b26fbaeac) update code.js to display properly in summary ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `resources/js/services/code.js` (+5 -1) </details> ### 📄 Description Fixes #781. Use codemirror display/autoReload addon to watch for state changes and resize the codemirror blocks if they were hidden when the DOM was loaded. > This is done by polling every 250 milliseconds (you can pass a value like {delay: 500} as the option value to configure this). > > [codemirror docs](https://codemirror.net/doc/manual.html#addon_autorefresh) I've set this to poll every 50ms, which was a bit smoother transition. A 1ms poll, just for fun, produced the best result but is likely to cause performance issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:19:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5889