react-dropzone/react-dropzone

Cannot get file dialog to open on Safari when changing dropzone attr in action chain

Open

#1,188 opened on 2022年5月3日

GitHub で見る
 (8 comments) (0 reactions) (0 assignees)JavaScript (10,254 stars) (779 forks)batch import
bughelp wantedneeds investigation

説明

Expected Behavior

Dialog opens on click of button with new attr taken into consideration

Actual Behavior

In Safari, double click is required to launch the open function if there is a chain of actions required

Steps to Reproduce the Problem

https://codesandbox.io/s/react-dropzone-example-forked-wn64on?file=/src/App.js:927-974

  1. Have different options for dropzone attr (accept used in example)
  2. Have multiple buttons in order to set attr and launch a chain of events which end in dialog box opening 2.1. If you setState and open in the same event open will happen before state is set
  3. Click on buttons, double click necessary.

In a more complex application, no amount of clicking makes the dialog open, but I wasn't able to reproduce in code sandbox. I'm hoping that the issues are related.

Real world example UI image

Specifications

  • Version: "^14.0.0", original issue found in version "^4.2.9"
  • Platform: Mac 11.6.4
  • Subsystem: Safari Version 15.3

コントリビューターガイド