aboutsummaryrefslogtreecommitdiff
path: root/js/src/button.js
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2020-03-09 16:21:04 +0100
committerGitHub <[email protected]>2020-03-09 17:21:04 +0200
commit7d8c7c4ba844f3e70b7cda20a5b813b54e43959d (patch)
tree92866d65495021a2c1aa32e2ddf9da19af3bea0f /js/src/button.js
parent14c4a601fe09cf6f711dffbb9240c4c8abc25767 (diff)
downloadbootstrap-7d8c7c4ba844f3e70b7cda20a5b813b54e43959d.tar.xz
bootstrap-7d8c7c4ba844f3e70b7cda20a5b813b54e43959d.zip
`prev()` function fails when non-element nodes are present (#30117)
The `prev()` function doesn't take nodes other than elements into account. Also we could simplify things a lot using the `previousElementSibling` property. This property isn't fully supported in IE, it only works for elements, but since the `element` variable is an element, we can safely use it here. I've also added an additional test. I don't think we had this issue in v4, since we relied on jQuery back then. Ref. https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode/nextElementSibling
Diffstat (limited to 'js/src/button.js')
0 files changed, 0 insertions, 0 deletions