Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve source editing textarea field size and scrolling behaviour #10566

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

dawidurbanski
Copy link
Contributor

@dawidurbanski dawidurbanski commented Sep 21, 2021

Suggested merge commit message (convention)

Fix (source-editing): Improve source editing textarea field size and scrolling behaviour. Closes #10422.


Additional information

Testing should be done with at least these steps:

  1. Run yarn manual --files=source-editing and test source editing with default content.
  2. Copy all the content from https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html to the manual test and check source editing again.
  3. Build docs locally (yarn docs && yarn docs:serve) and check http://127.0.0.1:8080/ckeditor5/29.2.0/features/source-editing.html

In all cases there should be:

  • No horizontal scroll.
  • All the content in text area should be reachable by scrolling down.
  • In manual test: textarea should be long and the body should be scrollable.
  • In docs: textarea should have max height of 700px and the textarea itself should be scrollable.

@Reinmar
Copy link
Member

Reinmar commented Sep 24, 2021

For some reason, this breaks the manual test.

If you open it on master, you can see the bottom of the editor:

On your branch, you cannot scroll further than this:

And I even tried adding padding to body. It didn't help.

The problem is probably related to some unnecessary padding in the textarea:

@dawidurbanski
Copy link
Contributor Author

@Reinmar I fixed what you have raised, and by the way simplified this ugly width calc thing. Turned out that after getting rid of css grid it was enough to apply box-sizing: border-box; onto textarea and it works just fine.

@Reinmar
Copy link
Member

Reinmar commented Sep 29, 2021

Out of curiosity, is this bug that these areas are not 100% width/height of available space resolved on your PR:

image

@dawidurbanski
Copy link
Contributor Author

Yes:

Screenshot 2021-09-30 at 14 29 48

@Reinmar Reinmar merged commit 3decb16 into master Oct 4, 2021
@Reinmar Reinmar deleted the ck/10422 branch October 4, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source editing view loses borders on scroll
2 participants