4

When using filepicker.io is there a function in the API to close the widget properly or do we need to trigger a click on the x link or on the background?

We want to detect when user presses ESC or TAB key and close the widget when this happens.

koopajah
  • 23,792
  • 9
  • 78
  • 104

1 Answers1

2

There is no api call to close the modal. Feel free to trigger the click event on the x.

Liyan Chang
  • 7,721
  • 3
  • 39
  • 59
  • On the other hand, having `esc` close the modal makes sense and we'll probably just put that in the main branch at some point in the next couple weeks. – Liyan Chang Nov 08 '12 at 16:27
  • Oh great, I'll wait for the update on this one and trigger the click for the moment. Will pressing ESC lead to the onError() being called? – koopajah Nov 08 '12 at 16:34
  • I needed to close the filepicker on state change in angular. My solution was to trigger a click on the close button as noted above. `$('.fp__close').trigger('click');` – Zack Huston Sep 04 '15 at 16:55