Fixed shadow DOM traversal issues.

Also fixed edit mode sidebar hover.