bug 860205 - check visible state when initialing.
Merge pull request #9110 from evelynhung/issue-860205

bug 860205 - check visible state when initialing. r=arthur