Fixes #949 popup and dropdown on sam element causes dropdown to show on popup visible