mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00: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:
parent
0448d4d609
commit
3a2cc1aa20
Notes:
github-actions[bot]
2024-11-21 12:17:27 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 3a2cc1aa20
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2460
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 47 additions and 13 deletions
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue