diff --git a/CHANGELOG b/CHANGELOG index cd0c1e94d..30f88d4be 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 ------------- diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 208d1560e..62d73696f 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -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', ));