Skip to content

Created code blocks are buggy until saving page #3292

Description

@Szwendacz99

Describe the Bug

Problematic behavior of code blocks that are just created (tested in private windows to make sure any local cache does not make troubles):

on Firefox:

  • new code block once closed is not editable until saving page and reopening editor
  • cannot delete new code block until reopening editor
  • when trying to add new unformatted line after new code block (by enter) it adds empty line only visually (its gone after saving the page) inside the code block instead (this is sometimes not gone after saving page, probably depends if the code block was the last element of page)

on Brave:

  • new code block once closed is not editable until saving page and reopening editor
  • cannot move caret next to new code block so it is impossible to add new line after it if this code block is the last element on the page (this is also fixed by saving page)

Steps to Reproduce

  1. open editor for any page
  2. Crtl+7 to create new block
  3. save this block
  4. behavior of the newly created block is as in the description of the bug

Expected Behaviour

Behavior from description does not occur.

Screenshots or Additional Context

empty, only visually added lines when trying to add new unformatted lines after code block in Firefox:
image

Exact BookStack Version

v22.02

PHP Version

8.0.8

Hosting Environment

Tested on official demo and my setup which basically is in Docker containers:

  • apache reverse-proxy
  • php 8.0.8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions