You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using codeView in fullScreen mode and suneditor created with height: 'auto' in SunEditorOptions object scrollbar is totally broken and content can't be scrolled.
It sets the text-area element height to be higher than the parent's.
Looks like we should use some other height there. Why can't we just not change it and leave it at "100%"?
Possible solutions
Use the appropriate height (where can we get it?)
Provide the correct value in context.element.code.scrollHeight (where can we get it?)
Do we really need this line? (lol)
Add !fullscreen condition.
I tested this way, and it works for this issue, but I am not sure if this is the correct solution in general, so without pull-request right now.
This issue applies to more than just the full-screen code view. The textarea containing the code view has overflow-hidden style applied to it directly. Removing overflow hidden corrects the behaviour.
Add the following to your page CSS
// Sidestep a bug in the editor code view, where it has no scrollbars!
.sun-editor .se-wrapper .se-wrapper-code {
overflow: auto !important;
}
Describe the bug
When using codeView in fullScreen mode and suneditor created with
height: 'auto'
inSunEditorOptions
object scrollbar is totally broken and content can't be scrolled.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Totally serviceable and usable vertical scrollbar and scrolling :)
Screenshots
Desktop (please complete the following information):
Additional context
It looks like the problem is in this line:
https://github.com/JiHong88/SunEditor/blob/00b9eff22be0f7385e8588218230c79b2d4c0df1/src/lib/core.js#L4277
It sets the text-area element height to be higher than the parent's.
Looks like we should use some other height there. Why can't we just not change it and leave it at "100%"?
Possible solutions
context.element.code.scrollHeight
(where can we get it?)!fullscreen
condition.I tested this way, and it works for this issue, but I am not sure if this is the correct solution in general, so without pull-request right now.
P.S. this line is too complicated.
Maybe you should also check other places that use this height.
The text was updated successfully, but these errors were encountered: