Fix bug where Chrome could not upload the same file that was selected before (#5854)

... and removed the cancel hack that is not needed anymore.
pull/5890/head
Aleksander Machniak 7 years ago
parent f483c08ddf
commit b6b5e42154

@ -15,6 +15,7 @@ CHANGELOG Roundcube Webmail
- Fix fatal error when using DMY- or MDY-based date format in PostgreSQL (#5808)
- Fix bug where errors were not printed when using bin/update.sh (#5834)
- Fix PHP 7.2 warnings on count() use (#5845)
- Fix bug where Chrome could not upload the same file that was selected before (#5854)
RELEASE 1.3.0
-------------

@ -2164,8 +2164,9 @@ class rcmail extends rcube
unset($attrib['buttons']);
$form_attr['class'] = 'smart-upload';
$input_attr = array_merge($input_attr, array(
// Note: Chrome sometimes executes onchange event on Cancel, make sure a file was selected
'onchange' => "if ((this.files && this.files.length) || (!this.files && this.value)) $event",
// #5854: Chrome does not execute onchange when selecting the same file.
// To fix this we reset the input using null value.
'onchange' => "$event; this.value=null",
'class' => 'smart-upload',
'tabindex' => '-1',
));

Loading…
Cancel
Save