add popup handling to link selector
fix a special case where url merging failed
Merge branch 'feature/link-selector-handle-popups' 14