Fixed a event order bug in MenuItem.js