Browser Ctrl + F doesn't find anything beyond the visable window and toolbar is not useable when height is auto

Created on 20 January 2021, about 4 years ago
Updated 4 March 2023, almost 2 years ago

Problem/Motivation

Thank you for this editor! There is a quirk that I cannot seem to fix.

If the editor is set to height:auto i.e
.CodeMirror {height: auto;}
Then the editor window resizes to the full height of the code and the scrollbars are removed.
If you use the browsers Ctrl + F it will find anything you are looking for in the code.

If the height is set to anything else
.CodeMirror {height: 500px;}
Then Ctrl + F will only find anything within the 500px limit.

We have pages with 1000s of lines of code so we need to be able to quickly find the section we want to edit so the {height: auto} is great for that however you then need to use the browsers scrollbar to move through the code and after the first few lines the toolbar disappears and is useless.

Is there a way to show scrollbars when .CodeMirror {height: auto;} is set so i can still use the toolbar but also the browser find function?

Or is there a way to make the toolbar sticky?

I've tried some css hacks but it looks like the class CodeMirror-vscrollbar is disabled when .CodeMirror {height: auto;} is present

Any suggestions would be appreciated.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

1.6

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024