fabianmichael / kirby-markdown-field

Super-sophisticated markdown editor for Kirby 3, community built.
Other
162 stars 14 forks source link

Re-building adds scrollbar #93

Closed medienbaecker closed 3 years ago

medienbaecker commented 4 years ago

I just cloned the repository and ran npm install and npm run build. Something seems to have changed because the textarea can now be scrolled. Downloading a pre-built release works.

CleanShot 2020-06-07 at 11 37 44

Can you reproduce this? Did you change something after building?

mtsknn commented 4 years ago

I can reproduce this! On Windows it looks even worse.

Seems to be related to the CodeMirror dependency. package.json has "codemirror": "^5.52.2" in devDependencies, i.e. the latest 5.x version is installed when running npm install.

Version 5.54.0 of CodeMirror was released on May 20 (see https://github.com/codemirror/CodeMirror/releases) and seems to be the version which adds the scrollbars. Proof:

  1. Run npm i codemirror@5.53.2 --save-exact && npm run build → the field has no scrollbars
  2. Run npm i codemirror@5.54.0 --save-exact && npm run build → the field has scrollbars

Limiting the dependency version to exactly 5.53.2 wouldn't be a sustainable solution but I don't know what would be. Some CSS trickery perhaps? Maybe someone who knows CodeMirror and/or this plugin better would know.