Fix DropLab in IE11 - v1
What does this MR do?
Some basic fixes for IE11 and Edge. Still not completely solid.
Many oddities
- Added a
CustomEvent
polyfill - Item template not being pulled in, just empty.
item.outerHTML
was just the element itself and no template so I had to refactor that a bit and grab the template early on. This seems to be a really weird detached node thing even though I can see the full template logging out the html of the list itself. - Tackled the
tagName
NPE by checking for the element at eachwhile
loop iteration. But still haven't figured out why those elements are getting detached from the DOM and don't have aparentNode
. This leaves some slight weirdness (see TODO below) but still usable - IE11/Edge were still triggering event listeners even after being removed which causes things to show/hide unexpectedly
Are there points in the code the reviewer needs to double check?
We’re going to fix droplab as if its an internal asset for gitlab-ce when this feature is released and stable, we will use the current droplab source from gitlab-ce to update the external repo
@lbennett, https://gitlab.slack.com/archives/frontend/p1484938443007236
This means we are missing the droplab tests in the CI for these changes
Why was this MR needed?
Screenshots (if relevant)
TODO
- In IE11, after choosing a category like "Author" you have to click in the input again to get the dropdown to show. This has to deal with how
isDropDownParts
is working andthisTag.parentNode
beingnull
so the check fails.
Does this MR meet the acceptance criteria?
-
Changelog entry added - Tests
-
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #26785 (closed)