Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Editor doesn't render if initially hidden #18

Closed
nkerkin opened this issue Nov 1, 2013 · 8 comments
Closed

Editor doesn't render if initially hidden #18

nkerkin opened this issue Nov 1, 2013 · 8 comments
Labels

Comments

@nkerkin
Copy link

nkerkin commented Nov 1, 2013

Check out this plunker http://plnkr.co/edit/zNdlc3jts4a8w3kS08uw?p=preview

The second editor doesn't render until you make a modification.

@jugglingcats
Copy link

Am also seeing this issue.

@harobed
Copy link

harobed commented Nov 27, 2013

+1

@ricochet1k
Copy link
Contributor

Looks like the same issue mentioned here: https://groups.google.com/forum/#!topic/ace-discuss/9oSvtlMuEqk

@ricochet1k
Copy link
Contributor

This might not be the best solution, but this does fix it: http://plnkr.co/edit/AoHjz4IXWcJXn6eLAFBb?p=preview

    scope.$watch(function() {
      return [elm[0].offsetWidth, elm[0].offsetHeight];
    }, function() {
      acee.resize();
      acee.renderer.updateFull();
    }, true);

@douglasduteil
Copy link
Contributor

@ricochet1k That's cool! Can you make a PR with it ?

@RaphaelRheault
Copy link

I found a similar problem when using ui-ace with ng-show in a ng-repeat.
It's probably related to this bug.
http://plnkr.co/edit/7BAtJ8vq0zP5rqbmcti6?p=preview

@RaphaelRheault
Copy link

Found a solution : use ng-if instead of ng-show. Everything works fine that way.

@douglasduteil
Copy link
Contributor

Alright It might be because Ace has to be refreshed when using ng-show/hide with the resize function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants