angular-confirm icon indicating copy to clipboard operation
angular-confirm copied to clipboard

ngShow / ngHide Classes Get Applied In The $$postDigest Phase Caused confirm box height error

Open Woodu opened this issue 8 years ago • 1 comments

Hi, I'm using angular 1.5.9 and angular-confirm 1.1.0.

Due to this article: https://www.bennadel.com/blog/2853-ngshow-nghide-classes-get-applied-in-the-postdigest-phase-in-angularjs-1-3.htm If I use dom controller with ng-hide or ng-show in confirm box template, the digest will first update confirm box height, then the dom get updated. so I changed some code on line 913~917 :

var thisBox = this;
          $timeout(function asyncTestCheck(){
            console.log($content.outerHeight());
            thisBox.$contentPane.css({
              'height': $content.outerHeight(),
            }).scrollTop(0);
            thisBox.$confirmBox.css(style);
          },0,false);

As a walkaround, I doesnt changed the calculate of contentHeight. Maybe could get fixed in next version.

Woodu avatar May 26 '17 07:05 Woodu

Thanks @Woodu for the idea, i will work on a reliable fix to this Your support is appreciated.

craftpip avatar May 26 '17 14:05 craftpip