]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Changing Backdrop rootElement to default to a string (#34092)
authorRyan Weaver <ryan@thatsquality.com>
Mon, 31 May 2021 09:35:59 +0000 (05:35 -0400)
committerGitHub <noreply@github.com>
Mon, 31 May 2021 09:35:59 +0000 (12:35 +0300)
commit0cb70e214ffd24070fa9e312746953faa0b8a305
tree0bc514423e0c217b3dd01ee0cbbb7b052b722c52
parente818c7cd5ddafdf68f627e5e3547bdd281bc5a5b
Changing Backdrop rootElement to default to a string (#34092)

The current config can cause the "body" to become stale. Specifically,
if the entire body element is swapped out for a new body element, then
the backdrop will continue to append itself to the original body element,
since it's stored in memory as a reference on this object.

This also no longer allows an explicit null to be passed to Backdrop's rootElement

This still accomplishes the laziness of "not finding the rootElement
until the Backdrop is created" to avoid problems of the JavaScript
being included inside <head> (so, before body is available).
js/src/util/backdrop.js
js/tests/unit/util/backdrop.spec.js