[BUGFIX release]  Fix usage of document.body.contains

Closes #5088.
don't we now just not correctly transition in browsers that lack contains?