refactor
handle "positionChange" event instead of "visibilityChange"