mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb: Allow custom properties in CSSStyleDeclaration.setProperty()
This change fixes unhoverable toolbar on https://excalidraw.com/ The problem was that React.js uses setProperty() to add style properties specified in the "style" attribute in the virtual DOM, and we were failing to add the CSS variable used to set the "pointer-events" value to "all".
This commit is contained in:
committed by
Alexander Kalenik
parent
0448d4d609
commit
3a2cc1aa20
Notes:
github-actions[bot]
2024-11-21 12:17:27 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/3a2cc1aa208 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2460 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<body></body>
|
||||
<script>
|
||||
test(() => {
|
||||
const div = document.createElement('div');
|
||||
div.style.setProperty("--redcolor", "red");
|
||||
|
||||
const nested = document.createElement('div');
|
||||
nested.style["backgroundColor"] = "var(--redcolor)";
|
||||
nested.style["width"] = "100px";
|
||||
nested.style["height"] = "100px";
|
||||
div.appendChild(nested);
|
||||
|
||||
document.body.appendChild(div);
|
||||
|
||||
println(getComputedStyle(nested).backgroundColor);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user