[#257] fixed potential issue where the browser (e.g. FF) does not allow to overwrite the Event.type property