[2.2, trunk] Window width directive fails to remove event from window

Bug #1668759 reported by Blake Rouse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Richard McCartney

Bug Description

Any page with the the windowWidth directive will failed to unregister the event handler from the window object, when the scope for that directive is destroyed. That means that anytime the window is resized functions will be called for elements that no longer exist, which will prevent the windowWidth directive from working as soon as the first handler in the event fails.

angular.js:2 ReferenceError: onResize is not defined
    at http://localhost:5240/MAAS/combo/maas-angular.js?v=fromsource(+bzr5763):8044:58
    at Scope.$broadcast (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:143903)
    at Scope.$destroy (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:141046)
    at cleanupLastView (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):4:5001)
    at http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):4:5578
    at publicLinkFn (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:56966)
    at boundTranscludeFn (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:59537)
    at controllersBoundTransclude (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:72622)
    at update (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):4:5364)
    at Scope.$broadcast (http://localhost:5240/MAAS/combo/angular.js?v=fromsource(+bzr5763):2:143903)

Related branches

description: updated
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.