Fixed #3427: fixed a bug of dispatchEvent in event manager

Fixed a bug of dispatchEvent in event manager