Panel: Do not close in response to a default-prevented swipe event

Fixes gh-6925
Closes gh-6947