From 01e59b8eadedde60e2a83f7463bfe37fb1c1117f Mon Sep 17 00:00:00 2001 From: xr0m3oz Date: Sat, 8 Dec 2018 21:36:16 +0200 Subject: [PATCH] Fix bug #269 --- src/DynamicFormWidget.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DynamicFormWidget.php b/src/DynamicFormWidget.php index 4fe09fd..85b9b3e 100644 --- a/src/DynamicFormWidget.php +++ b/src/DynamicFormWidget.php @@ -204,6 +204,7 @@ public function registerAssets($view) // add a click handler for the clone button $js = 'jQuery("#' . $this->formId . '").on("click", "' . $this->insertButton . '", function(e) {'. "\n"; $js .= " e.preventDefault();\n"; + $js .= " e.stopImmediatePropagation();\n"; $js .= ' jQuery(".' . $this->widgetContainer . '").triggerHandler("beforeInsert", [jQuery(this)]);' . "\n"; $js .= ' jQuery(".' . $this->widgetContainer . '").yiiDynamicForm("addItem", '. $this->_hashVar . ", e, jQuery(this));\n"; $js .= "});\n";