emberjs/ember.js — pull request #5332 by jamesarosen (2014-08-06 16:15:49+00:00)
Title: Reorder Ember.View#_toggleVisibility

Previously, this function was a no-op if the view's element was not in the DOM. That meant that if such a view's `isVisible` property changed, `_toggleVisibility` wouldn't make it far enough to sync up its internal `_isVisible` property with the new `isVisible` value.

With those two values out of sync, if the view's `isVisible` changed *again*, `_isVisibleDidChange` wouldn't properly schedule (or properly *not* schedule) a subsequent call to `_toggleVisibility`. Thus, the view's actual DOM visibility would no longer match its `isVisible` property.

Closes #5329