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

Dysfunctional autoExpand vs maximize #523

Closed
mjau-mjau opened this issue Jul 4, 2016 · 3 comments
Closed

Dysfunctional autoExpand vs maximize #523

mjau-mjau opened this issue Jul 4, 2016 · 3 comments
Milestone

Comments

@mjau-mjau
Copy link

Im trying to use the autoExpand feature so that the input expands vertically when required, while input is added. Problem is, scroll gets messed up in maximized mode when autoexpand is enabled. Sometimes cursor ends up below visible stage, and the scroll starts jumping up and down.

Hard to take a screenshot of this. When autoExpand is disabled, maximized mode works perfectly. Is it possible to disable autoExpand by API as a way to avoid this issue?

@mjau-mjau
Copy link
Author

mjau-mjau commented Jul 6, 2016

I did some further research, and when autoExpand: true, it seems SCEditor is trying to set the height of the iframe also in maximized view, which makes the input buggy. I have implemented a simple CSS fix for this behavior:

.sceditor-container.sceditor-maximize iframe {
  height: 90vh !important;
}

It's not perfect, as it leaves a tiny gap at bottom of screen on large screens in maximized view. It would require a javascript hack to apply height by pixel, but that would be more complicated, because you can't apply !important with javascript, so it would not be able to overwrite the CSS applied by SCEditor on keyup. Good enough.

@Somnium7
Copy link

Same here!

@samclarke samclarke added this to the v2.0.0 milestone Feb 7, 2017
@samclarke
Copy link
Owner

Thanks for reporting. This will be fixed when v2 is released.

Spuds pushed a commit to Spuds/SCEditor that referenced this issue Mar 8, 2017
Make it expand and shrink.
Fixes bug whent he editor is maximised.
Fixes samclarke#552 and fixes samclarke#523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants