Hello everyone,
I recently got a notification from some users of my Google Maps component that it no longer worked.
Some notes about the issue are here with my investigation, it seems that there is an issue in the Qualtrics-provided code that hangs with a certain logic.
In short, it seems the code overrides the behavior of ChildNode.remove(), yet lacks the validation of the parent node of an HTML element when it removes itself.
// prototype.45d699cfb71157c2bc5a.js:1:30423
function c(t) {
return (t = e(t)), t.parentNode.removeChild(t), t; // t.parentNode could be undefined
}
Therefore, the minimal code to replicate the issue below:
var x = document.createElement("div");
x.remove();
alert("Hello World!"); // does not work
stops at line 2 and does not show the alert.
It means that, sadly, any package or external JavaScript that removes HTML elements in their code will no longer work. In my case, Google Maps API tried to add a navigation tooltip and it caused an error.
// map.js:107:415
var x = document.createElement("span");
x.textContent =
"To navigate the map with touch gestures double-tap and hold your finger on the map, then drag the map.";
_.Ft(a, "gesturehandling_changed", () => {
_.qu() && "none" !== a.get("gestureHandling") ? w.prepend(x) : x.remove(); // remove() does not work
});
1 - Does anyone else experience this issue recently?
2 - If so, to Qualtrics, isn’t it really a problem to fix?