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
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.

Show comment
Hide comment
@fjakobs

fjakobs Feb 2, 2011

Contributor

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.

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.

Show comment
Hide comment
@adamjimenez

adamjimenez Feb 2, 2011

Contributor

already calling "editor.resize()"

Contributor

adamjimenez commented Feb 2, 2011

already calling "editor.resize()"

@adamjimenez

This comment has been minimized.

Show comment
Hide comment
@adamjimenez

adamjimenez Feb 2, 2011

Contributor

didn't mean to close!

Contributor

adamjimenez commented Feb 2, 2011

didn't mean to close!

@fjakobs

This comment has been minimized.

Show comment
Hide comment
@fjakobs

fjakobs Feb 2, 2011

Contributor

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().

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.

Show comment
Hide comment
@adamjimenez

adamjimenez Feb 3, 2011

Contributor

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

Contributor

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.

Show comment
Hide comment
@fjakobs

fjakobs Feb 3, 2011

Contributor

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

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.

Show comment
Hide comment
@adamjimenez

adamjimenez Feb 3, 2011

Contributor

I've updated the test to use relative instead.

Everything seems ok to me..

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

Contributor

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.

Show comment
Hide comment
@fjakobs

fjakobs Feb 3, 2011

Contributor

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?

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.

Show comment
Hide comment
@adamjimenez

adamjimenez Feb 3, 2011

Contributor

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

Contributor

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