Try to catch syntax errors in the Click Open popup trigger Extra Selectors input field
marklchaves opened this issue · 0 comments
Describe the feature request
It'd be great to add some form validation for CSS syntax checking when adding extra CSS selectors to a Click Open trigger.
Use case
If I add a[href="https://twenty-twentyone.local/ "
it will get saved with no issues, but the popup won't trigger unless the same syntax error is in the calling HTML. (Note: The example has a blank space before the closing double quote and is missing a closing bracket.)
When I use the Popup Maker admin toolbar to open the popup or click anywhere on the page that has the popup loaded, I'll see an exception in the console. See below.
If we are able to validate the syntax or even generate the correct syntax behind the scenes, this would prevent manual typing and syntax errors, especially for the Link Presets feature.
Example screenshots (if any)
Exception in the browser console: https://share.wppopupmaker.com/2NuzJL1P