Important Editing
The problem does not occur with ng-hide , we removed this code to crash the bootstrap, but it still occurs. My next consideration is the following code snippet
<div ng-include="getTemplateUrl()"></div>
This is the whole directive:
stuffModule.directive('stuffDirective', function ($compile) { var oldId = undefined; return { restrict: 'E', scope: { model: '=' }, link: function (scope, elem, attrs) { scope.$watch(function (scope) { if (oldId !== scope.model.key) { oldId = scope.model.key; return true; } return false; }, function (newValue, oldValue) { if (scope.model.someswitch) { switch (scope.model.someswitch) { case 'condition1': scope.getTemplateUrl = function () { return 'condition1.html'; } break; case 'condition2': case 'condition3': scope.getTemplateUrl = function () { return 'condition23.html'; } break; default: break; } } else { scope.getTemplateUrl = function () { return 'default.html'; } } }); }, template: '<div ng-include="getTemplateUrl()"></div>' }; });
Just a brief explanation, it is literally impossible to scroll with the mouse, but you can easily insert fields.
PS: This only happens in Internet Explorer 11, that is, in the version that our client uses. In Firefox, I do not have this problem.
We replaced the code
Since an important presentation will take place tomorrow, and the missing scrollbar is really a big problem, we decided to remove the code fragment and replace it with the normal normal.
Thanks to all the commentators :)
The original question with ng-hide
I have a simple page where I hide the part with ng-hide . When ng-hide turns false , the part is displayed, but the page does not scroll randomly until I reload the entire page.
If that helps, the data that turns ng-hide to false comes from an AJAX request.
EDIT 1 - no longer relevant
Here is the code that makes HTTP requests
this.getCall = function (url) { var dfd = $q.defer(); $rootScope.loading = true; $rootScope.loadingError = false; $rootScope.progressActive = true; $rootScope.loadingClass = "progress-bar-info"; $http.get('http://localhost/something', { cache: true }).success(function (data) { $rootScope.loadingClass = "progress-bar-success"; $rootScope.progressActive = false; $timeout(function () { $rootScope.loading = false; }, 500); dfd.resolve(data); }).error(function (data, status, headers) { $rootScope.loading = false; $rootScope.loadingError = true; $rootScope.progressActive = false; $rootScope.loadingClass = "progress-bar-danger"; console.error(data); dfd.reject(JSON.stringify(data)); }); return dfd.promise; };
The properties on $routescope should show a simple progress bar for each HTTP request.