Skip to content

Resetting style property via elt.style.xxx doesn't work #9377

Closed

Description

@paulrouget

Here is an example. The div should turn transparent. It doesn't.

<div style="width:200px;height:200px;border:2px solid red;background:blue"></div>

<script>

  setTimeout(() => {
    document.querySelector("div").style.background = "";
  }, 1000);

</script>

Activity

  1. paulrouget commented on Jan 19, 2016

    @paulrouget
    ContributorAuthor

    This breaks React and virtual-dom based libraries.

  2. paulrouget commented on Jan 19, 2016

    @paulrouget
    ContributorAuthor

    Calling document.content_changed(node, NodeDamage::NodeStyleDamaged) in cssstyledeclaration.rs#RemoveProperty appears to fix this issue. I'll submit a PR.

  3. added 2 commits that reference this issue on Jan 27, 2016
    81381ea
    8c07362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions