projectblacklight / blacklight_range_limit

Range facet/limit/profile plugin for Blacklight
http://github.com/projectblacklight/blacklight_range_limit
Other
20 stars 40 forks source link

fix: add mutation observer for BL8 Modal and support Turbo #248

Closed yetti closed 9 months ago

yetti commented 9 months ago

Blacklight 8 uses an HTML Dialog element instead of a Bootstrap modal, so it won't fire the 'shown.bs.modal' events when opened. This adds a MutationObserver to check if the 'open' attribute is added to the HTML Dialog element, to determine if it's open. It also adds a function that can be called to add 'turbo:load' event handlers for those that want to support re-/rendering after Turbo navigation.

yetti commented 9 months ago

Closing as there are more issues around supporting Turbo than I initially thought. It's probably better not to include that functionality in this PR.