Add before:show events
Merge remote-tracking branch 'github/pr/1018' into 1.7