Fixed a bug that ribbon doesn't disappear in edit mode.