Fix #1609 & #1608 confirmation popup is not working
Merge pull request #827 from nlegoff/fix1609

[3.8] Fix #1609 & #1608