peckadesign / pd-naja

1 stars 0 forks source link

`popstate` event always prevented for non-modal states #2

Open zipper opened 1 year ago

zipper commented 1 year ago

There is a problem for non-modal request, where AjaxModalExtension calls event.stopImmediatePropagation() for every non-modal state retrieved. Therefore no other popstate handlers will be run, even from other extensions or unrelated page scripts (if they were added after this callback).

Originally this event.stopImmediatePropagation() has been added for preventing extra request when closing modal which has been opened with data-naja-snippet-cache="off". In that case, there was an unnecessary request made.