instructure / ic-modal

Ember component for modal dialog
MIT License
62 stars 15 forks source link

Add guard for destroyed modal in handleTabIntoBrowser #18

Closed linstula closed 10 years ago

linstula commented 10 years ago

This PR adds a guard to handleTabIntoBrowser to do an early return if the modal is in a destroyed state.

During our integration tests, our teardown hook was destroying the app instance but we weren't explicitly closing the modal. When we were hitting our subsequent tests, ic-modal was trying to focus in on the modal even though it was in a destroyed state. While we're now making sure we explicitly close the modal in our teardown hook, it feels like ic-modal should internally handle this and guard against trying to focus on a destroyed modal.

linstula commented 10 years ago

This issue was resolved by #13