Fix bug in Opera 12 with <element>.dataset and Object.keys()
Opened this issue · 2 comments
termi commented
CORE-44107: updating of <element>.dataset
is frozen if apply Object.keys
to it before any <element>.setAttribute
.
Bug detection [Draft]:
var a = document.createElement('a');
Object.keys(a.dataset);
a.setAttribute("data-a", "");
if(Object.keys(a.dataset).length == 0)console.log("BUG")
Opera versions:
At least in Opera 11.61 and Opera 12.1256 Alpha
Note:
for(var name in a.dataset){}
instead ofObject.keys(a.dataset)
do the same behavior
How we can't fix this bug:
- Can't replace
Object.keys
due Note#1 - Can't fix
document.createElement
due it's not fixed existing elements
Raynos commented
Does the same happen if we just touch a.dataset
? Like var a = document.createElement("a"), b = a.dataset;
?
Have you raised a ticket with the opera guys?