0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/js
Martijn Cuppens 7d8c7c4ba8
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
2020-03-09 17:21:04 +02:00
..
dist Dist (#29638) 2019-11-08 10:11:23 +02:00
src prev() function fails when non-element nodes are present (#30117) 2020-03-09 17:21:04 +02:00
tests prev() function fails when non-element nodes are present (#30117) 2020-03-09 17:21:04 +02:00
index.esm.js return to the original file structure to avoid breaking modularity 2019-10-03 09:55:57 +02:00
index.umd.js return to the original file structure to avoid breaking modularity 2019-10-03 09:55:57 +02:00