Fix #1387

Escape / close / window x should not close needs manager when in resource edit mode

See #1387