Skip to content

Commit db366a8

Browse files
revert($dialog): revert handling of location change events
1 parent 04a21e3 commit db366a8

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

src/dialog/dialog.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ dialogModule.provider("$dialog", function(){
185185
Dialog.prototype._bindEvents = function() {
186186
if(this.options.keyboard){ body.bind('keydown', this.handledEscapeKey); }
187187
if(this.options.backdrop && this.options.backdropClick){ this.backdropEl.bind('click', this.handleBackDropClick); }
188-
189-
this.$scope.$on('$locationChangeSuccess', this.handleLocationChange);
190188
};
191189

192190
Dialog.prototype._unbindEvents = function() {

src/dialog/test/dialog.spec.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -289,23 +289,6 @@ describe('Given ui.bootstrap.dialog', function(){
289289
});
290290
});
291291

292-
describe('When dialog is open and location changes', function () {
293-
294-
var changeLocation = function () {
295-
$rootScope.$apply(function(){
296-
$rootScope.$broadcast('$locationChangeSuccess');
297-
});
298-
};
299-
300-
beforeEach(function () {
301-
createDialog({template: template});
302-
openDialog();
303-
changeLocation();
304-
});
305-
306-
dialogShouldBeClosed();
307-
});
308-
309292
describe('when opening it with a template containing white-space', function(){
310293

311294
var controllerIsCreated;

src/modal/test/modal.spec.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,5 @@ describe('Give ui.boostrap.modal', function() {
167167
$scope.$digest();
168168
expect($scope.modalShown).not.toBeTruthy();
169169
});
170-
171-
it('should update the model if the location change is successful', function () {
172-
$rootScope.$apply(function(){
173-
$rootScope.$broadcast('$locationChangeSuccess');
174-
});
175-
expect($scope.modalShown).toBeFalsy();
176-
});
177-
});
170+
});
178171
});

0 commit comments

Comments
 (0)