diff --git a/.gitignore b/.gitignore index aa8118d17e..af0447292d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ docs/build /build .DS_Store *.codekit3 - +yarn.lock run_local.sh diff --git a/src/Modal.php b/src/Modal.php index df4ffa3cb5..73049ef393 100644 --- a/src/Modal.php +++ b/src/Modal.php @@ -81,7 +81,10 @@ public function enableCallback() if ($this->cb->triggered() && $this->fx) { $this->fx[0]($this->cb_view); } - $this->app->terminate($this->cb_view->renderJSON()); + $modalName = isset($_GET['__atk_m']) ? $_GET['__atk_m'] : null; + if ($modalName === $this->name) { + $this->app->terminate($this->cb_view->renderJSON()); + } }); } @@ -279,6 +282,7 @@ public function renderView() $data['label'] = $this->loading_label; if (!empty($this->fx)) { + $this->cb_view->stickyGet('__atk_m', $this->name); $data['uri'] = $this->cb->getJSURL(); }