Skip to content

Modal inside ActiveForm not closing when clicking on overlay  #185

@niklaswolf

Description

@niklaswolf

When I render a modal inside a ActiveForm, the modal can't be closed by clicking on the background/overlay. When the modal is rendered outside of the ActiveForm, everything works fine!
Here's the markup:

<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']])
    ...
    Modal::begin([
			'header' => 'Some title',
			'size' => Modal::SIZE_LARGE,
			'toggleButton' => [
				'label' => "More info",
				'class' => 'btn btn-sm btn-info'
			]
		]);?>
		<div class="info-content">
			...
		</div>
   <?php Modal::end();
   ...
ActiveForm::end()?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions