# Sw-modal not getting closed even after clicking on x button

**URL:** <https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923>\
**Category:** Shopware 6 (English)\
**Tags:** general, administration, programming\
**Created:** [23. August 2022 um 16:33 UTC](https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923 "2022-08-23T16:33:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mana](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mana](https://forum.shopware.com/u/mana)\
**Post date:** [23. August 2022 um 16:33 UTC](https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923/1 "2022-08-23T16:33:10Z")

</div>

Hi,  
I am trying to use sw-modal component but facing issue with specifying its properties, not able to close the modal once it is opened.

below is the code :

```auto
<sw-modal
	  class="test__modal"
	  size="200px"
	  title="modal title"
      > Hello this is modal </sw-modal>

```

Please let me know if I need to add anything here or missing something.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![abdullah](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@abdullah](https://forum.shopware.com/u/abdullah)\
**Post date:** [24. August 2022 um 11:25 UTC](https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923/2 "2022-08-24T11:25:31Z")

</div>

If you open the browser console is there an error?

If you remove the size attribute, can you then close the modal?

---

<div class="post-metadata">

**Author:** ![mana](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mana](https://forum.shopware.com/u/mana)\
**Post date:** [24. August 2022 um 12:01 UTC](https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923/3 "2022-08-24T12:01:59Z")

</div>

There is no error, tried with firefox and chrome.  
Removing size did not help.

---

<div class="post-metadata">

**Author:** ![jfranke](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jfranke](https://forum.shopware.com/u/jfranke)\
**Post date:** [11. Januar 2023 um 11:05 UTC](https://forum.shopware.com/t/sw-modal-not-getting-closed-even-after-clicking-on-x-button/95923/4 "2023-01-11T11:05:22Z")

</div>

Heyo mana,

did you manage to fix this? Do you maybe have any news about this issue?

Im currently trying to solve it also. I found this post on the Issuetraccker:  
[Issue - NEXT-23962](https://issues.shopware.com/issues/NEXT-23962)

Maybe you can vote-up the issue, so it get fixed 🙂
