facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
18.24k stars 1.53k forks source link

Bug: CSS property `scroll-padding` not working #6016

Open Danishsjjd opened 2 months ago

Danishsjjd commented 2 months ago

If I disable javascript and apply scroll-padding css to html it just works but when I enable javascript in playground, the scroll-padding only works if the length of node text is greater then 1

Lexical version: 0.14.5

Steps To Reproduce

From lexical documentation home page plain text example, just apply scroll padding to html in style.css

Link to code example: https://stackblitz.com/edit/facebook-lexical-znjtmx

The current behavior (With JavaScript enabled)

https://github.com/facebook/lexical/assets/92915951/65df6227-ce5d-44a2-8895-b689c84816be

The expected behavior (without javascript)

https://github.com/facebook/lexical/assets/92915951/c1cf08d1-4fdc-4ac6-9145-f1b9de398dbf

StyleT commented 2 months ago

Another video to showcase the issue... Notice scroll jump of the page when I start typing in. That jump shouldn't be there.

https://github.com/facebook/lexical/assets/1125900/63f91889-e065-459c-8c6f-c1333ba0a05f