Skip to content

Commit

Permalink
Allow turbo frame updates inside kpop modals
Browse files Browse the repository at this point in the history
  • Loading branch information
sfnelson committed Nov 26, 2024
1 parent 85516ff commit 779f0cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
katalyst-kpop (3.2.3)
katalyst-kpop (3.2.4)
katalyst-html-attributes
turbo-rails
view_component
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/kpop/controllers/frame_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export default class Kpop__FrameController extends Controller {
beforeFrameRender(event) {
this.debug("before-frame-render", event.detail.newFrame.baseURI);

if (event.detail.newFrame.id !== this.element.id) return;

event.preventDefault();

this.dismiss({ animate: true, reason: "before-frame-render" }).then(() => {
Expand Down
2 changes: 1 addition & 1 deletion katalyst-kpop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "katalyst-kpop"
spec.version = "3.2.3"
spec.version = "3.2.4"
spec.authors = ["Katalyst Interactive"]
spec.email = ["[email protected]"]

Expand Down

0 comments on commit 779f0cc

Please sign in to comment.