Page 1 of 1

Is there an event that targets dropzone?

Posted: 03 Dec 2019, 20:28
by rhinobomb
Is there an event that fires whenever dropzone is displayed? The hooks I've been using do run when dropzone is there but they also run on some pages that don't have dropzone. I get some javascript errors but that is the extent of it so it's not a showstopper but I would like to clean it up.

Re: Is there an event that targets dropzone?

Posted: 09 Jun 2020, 20:16
by Starbuck
What about checking for the presence of window.dropzone?
Or look for other markers that indicate a dropzone target is on the page?
https://www.dropzonejs.com/

Re: Is there an event that targets dropzone?

Posted: 10 Jun 2020, 12:57
by cas
The below pages have a direct reference to a dropzone (other than defining and/or enabling). The last 2 scripts are included quite a lot so you would need to verify which functions with "dropzone" from those 2 are referenced in all the scripts (tedious job) :mrgreen:
bug_report_page.php
bugnote_add_inc.php
core/html_api.php
core/print_api.php