Fix null event unsupported on webkit