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

ace doesn't fit inside a container div #75

Closed
adamjimenez opened this Issue Feb 2, 2011 · 9 comments

Comments

Projects
None yet
2 participants
@adamjimenez
Copy link
Contributor

adamjimenez commented Feb 2, 2011

I'd like Ace to fit inside a container div.

See:
http://shiftedit.net/tests/ace-resize

@fjakobs

This comment has been minimized.

Copy link
Contributor

fjakobs commented Feb 2, 2011

Are you using the packaged Ace? That version only listens on window resize events, which do not happen in this case. You need to call "editor.resize()" manually.

@adamjimenez

This comment has been minimized.

Copy link
Contributor Author

adamjimenez commented Feb 2, 2011

already calling "editor.resize()"

@adamjimenez

This comment has been minimized.

Copy link
Contributor Author

adamjimenez commented Feb 2, 2011

didn't mean to close!

@fjakobs

This comment has been minimized.

Copy link
Contributor

fjakobs commented Feb 2, 2011

Ace sets the editor element to "position:absolute", that's why the editor element doesn't resize with the container. This is more or less a pure CSS issue. One solution would be to explicitly set the size on the editor element and call resize().

@adamjimenez

This comment has been minimized.

Copy link
Contributor Author

adamjimenez commented Feb 3, 2011

I take it ACE has to set it to absolute in order to work correctly?

@fjakobs

This comment has been minimized.

Copy link
Contributor

fjakobs commented Feb 3, 2011

Correct. You can try to override the position style and see what happens. Would be interesting to know :)

@adamjimenez

This comment has been minimized.

Copy link
Contributor Author

adamjimenez commented Feb 3, 2011

I've updated the test to use relative instead.

Everything seems ok to me..

http://shiftedit.net/tests/ace-resize

@fjakobs

This comment has been minimized.

Copy link
Contributor

fjakobs commented Feb 3, 2011

I think I'll keep it absolute for the time being but it is good to know that Ace also works with relative positioning.

I guess I can close this?

@adamjimenez

This comment has been minimized.

Copy link
Contributor Author

adamjimenez commented Feb 3, 2011

If relative works then I think it's preferable. But it's not a biggy for me and understand if u wontfix.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment