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

Source editing view loses borders on scroll #10422

Closed
niegowski opened this issue Aug 25, 2021 · 7 comments · Fixed by #10566
Closed

Source editing view loses borders on scroll #10422

niegowski opened this issue Aug 25, 2021 · 7 comments · Fixed by #10566
Assignees
Labels
package:source-editing squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@niegowski
Copy link
Contributor

📝 Provide detailed reproduction steps (if any)

  1. http://fake.ckeditor.com:8081/build/docs/ckeditor5/latest/features/source-editing.html
  2. Open source editing mode
  3. Scroll content (both horizontally and vertically)

✔️ Expected result

The border is still visible.

❌ Actual result

Borders scroll out of the visible area.

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

📃 Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@niegowski niegowski added type:bug This issue reports a buggy (incorrect) behavior. squad:core Issue to be handled by the Core team. package:source-editing labels Aug 25, 2021
@Reinmar
Copy link
Member

Reinmar commented Sep 1, 2021

The textarea is too wide:

We need to force it to have 100% of its parent width. Not more.

But, why do we use display: inline-grid there?

A thing to consider (that we should not break): the auto-resize of textarea's height.

This needs to be tested in all browsers.

@Reinmar
Copy link
Member

Reinmar commented Sep 1, 2021

The horizontal scroll solution: word-break: break-all + white-spaces: pre-wrap.

The vertical scroll has to be checked, because we must make the container of the textarea not scrollable. The tricky part is why is there max-width: 700px for the container. If it's a workaround for the toolbar not being sticky in source editing, we should not break it here. So, if in a reasonable 2h check this cannot be fixed, let's not change it.

Also: test this in a manual test (without documentation page style)!

@Reinmar Reinmar added this to the iteration 47 milestone Sep 13, 2021
@Reinmar Reinmar changed the title Source editing view looses borders on scroll Source editing view loses borders on scroll Sep 13, 2021
@dawidurbanski dawidurbanski self-assigned this Sep 21, 2021
@dawidurbanski
Copy link
Contributor

Instead of adding word-break: break-all + white-space: pre-wrap to fix it, I went for removing the source of the problem, the grid thing.

I replaced it with some good old position stuff.

After making it work in manual test (in general case) I slightly modified source editing snippet css to work with the new update (so it works in conjunction with max-width: 700px on the container).

Fixed in #10566

@dawidurbanski
Copy link
Contributor

dawidurbanski commented Sep 22, 2021

@ckeditor/qa-team could you check this cross-browser? Steps are described in the PR additional information section: #10566 (comment)

@Mgsy
Copy link
Member

Mgsy commented Sep 22, 2021

@ckeditor/qa-team could you check this cross-browser? Steps are described in the PR additional information section: #10566 (comment)

Looks good in all browsers 👍

@theezeb
Copy link

theezeb commented Sep 23, 2021

@dawidurbanski I have integrated the CKE5(decoupled-editor), but here i'm not getting the scroll for some reason, could you look at this?

image

@dawidurbanski
Copy link
Contributor

@shahzebgit by default Source Editing feature textarea has overflow: hidden applied. If for any reason you restrict editor (and therefore source textarea) height, you need to make sure this field gets correct overflow:

.your-container-class .ck-source-editing-area textarea {
    overflow: auto;
}

@Reinmar Reinmar modified the milestones: iteration 47, iteration 48 Sep 24, 2021
Reinmar added a commit that referenced this issue Oct 4, 2021
Fix (source-editing): Improve source editing textarea field size and scrolling behaviour. Closes #10422.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:source-editing squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants