Bugfix/h5 maxlength and mouse down (#1576)