add observers when added to the window vs when added to the view

fix for issue #1699