-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Short description of the issue
I've been seeing this JS error for a while but only recently found a reliable way to reproduce it using core functionality only. Besides the example given below the issue also affects modal editing of pages via ListerPro, and probably lots of other cases involving modal windows.
The error is...
Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'option'
...and the code responsible is: https://github.com/processwire/processwire/blob/51629cdd5f381d3881133baf83e1bd2d9306f867/wire/modules/Jquery/JqueryUI/modal.js#L218-L220
Steps to reproduce the issue
- Open a page in Page Edit that has two or more images in it.
- For one image, click the "Crop" button to open a modal window for the image.
- Close the modal.
- For a different image, click the "Crop" button to open a modal window for the image.
- With the modal still open, resize the browser window.
- Note the JS error in the console.
The JS error breaks all subsequent JS - e.g. in a ListerPro scenario the lister becomes non-functional.
Setup/Environment
- ProcessWire version: 3.0.153
