When closing to :root, properly trigger . Fixes issue #513
Also re-fixed issue #233 regression
Merge pull request #514 from clearsightstudio/pm_issue_513

When closing to :root, properly trigger `on_return`