Semantic-ui: [Modal] destroy should tear down mutation observer

Created on 21 Jun 2019  路  3Comments  路  Source: Semantic-Org/Semantic-UI

Steps

  • Show a modal with {observeChanges: true}
  • Hide the modal (either programmatically or by, e.g. clicking on the dimmer)
  • Some DOM updates are performed during the hide/destruction phase of the modal

Expected Result

Scroll lock is removed from the dimmer root

Actual Result

Scroll lock is incorrectly reinstated after tear down of the modal

Version

2.4.0

Testcase

The test case is quite tricky to extract as the specific problem I'm facing is caused by the interaction of Angular and the teardown mechanism of the modal. I can make a PR that fixes the behaviour as I have patched my local version to achieve the correct result.

Most helpful comment

@lubber-de I've made a PR against Fomantic-UI as well to expedite this. Let me know if there's anything else you need.

All 3 comments

@euangoddard
Would you like to create your PR for https://github.com/fomantic/Fomantic-UI as well ?
It will get merged there much more sooner than here, i guess 馃槈

Hint: If you do, please base your PR on the develop branch instead of master

If you don't / won't, i love to adopt your fix for Fomantic-UI myself, because it makes sense (same logic is used in dropdown/sticky/popup/visibility already)

@euangoddard In case you are going to prepare the PR for Fomantic-UI as well, please see my Review comments before.

@lubber-de I've made a PR against Fomantic-UI as well to expedite this. Let me know if there's anything else you need.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deneuxa picture deneuxa  路  3Comments

ghost picture ghost  路  3Comments

zhaoyao91 picture zhaoyao91  路  3Comments

miguelmota picture miguelmota  路  3Comments

guilhermeblanco picture guilhermeblanco  路  3Comments