Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu demo: items are deleted when selected #11941

Open
cbrewster opened this issue Jun 30, 2016 · 11 comments
Open

Menu demo: items are deleted when selected #11941

cbrewster opened this issue Jun 30, 2016 · 11 comments

Comments

@cbrewster
Copy link
Member

@cbrewster cbrewster commented Jun 30, 2016

This is a demo on the about:newtab on bhtml.
The checkbox to the left of the item should be checked rather than the item being deleted.
menu_items_disappear

@cbrewster
Copy link
Member Author

@cbrewster cbrewster commented Jun 30, 2016

Adding P1 as I assume we want all the linked demos on the newtab page to work properly. Feel free to change it if it shouldn't be P1.

@glennw
Copy link
Member

@glennw glennw commented Jun 30, 2016

Unsurprisingly, but just to confirm - this occurs both with and without WR enabled.

@asajeffrey asajeffrey self-assigned this Jun 30, 2016
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 30, 2016

A minimal example which demonstrates this behaviour:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Minimal example for #11941</title>
    <style>
    ul li {
      color: #92a5bf;
      background-color: #f5f8fe;
      transition: linear 0.2s all;
    }
    ul.active li {
      background-color: red;
    }
    </style>
  </head>

  <body>

    <ul>
      <li>
    <input id='website' name='type' type='radio'>
    <label for='website'>Website</label>
      </li>
      <li>
    <input id='icon' name='type' type='radio'>
    <label for='icon'>Icon</label>
      </li>
      <li>
    <input id='mobile' name='type' type='radio'>
    <label for='mobile'>Mobile</label>
      </li>
    </ul>

  </body>
  <script>
    window.onload = function() {
      document.getElementsByTagName("ul")[0].setAttribute("class","active");
    };
  </script>
</html>
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 30, 2016

OK, this is just weird:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Minimal example for #11941</title>
    <style>
    ul.active li.unselected {
      color: red;
      transition: linear 0.2s all;
    }
    ul.active li.selected {
      color: blue;
      transition: linear 0.2s all;
    }
    </style>
  </head>

  <body>

    <ul>
      <li class="unselected">
    <input id='website' name='type' type='radio'>
    <label for='website'>Website</label>
      </li>
      <li>
    <input id='icon' name='type' type='radio'>
    <label for='icon'>Icon</label>
      </li>
      <li>
    <input id='mobile' name='type' type='radio'>
    <label for='mobile'>Mobile</label>
      </li>
    </ul>

  </body>
  <script>
    window.onload = function() {
    document.getElementsByTagName("ul")[0].setAttribute("class","active");
    var lis = document.getElementsByTagName("li");
    var selection = null;
    for (var i=0; i<lis.length; i++) {
        lis[i].setAttribute("class","unselected");
        lis[i].onclick = function() {
        if (selection) { selection.setAttribute("class","unselected"); }
        selection = this;
        this.setAttribute("class","selected");
        }
    }                  
    };
  </script>
</html>

The bullet on the li ends up a different color than its text!

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Jun 30, 2016

Definitely an incremental layout bug; can’t reproduce it when running with --nonincremental-layout.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 30, 2016

For me, the 2nd example is weird even with --nonincremental-layout.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 30, 2016

IRC chat: http://logs.glob.uno/?c=mozilla%23servo&s=30+Jun+2016&e=30+Jun+2016#c467566

TL;DR: @metajack says "can you rpelace it with spinner?".

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jun 30, 2016

If this isn't on the splash page, fixing it isn't P1.

@metajack
Copy link
Contributor

@metajack metajack commented Jul 1, 2016

I wonder if this is the same error as on mozilla.org/en-US/. Mousing over any of the tiles removes them permanently.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 1, 2016

Could be, it's caused by css transitions not leaving things in the right state. I can believe mozilla.org is using transitions the same way.

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

Test case from #11941 (comment) still behaves weirdly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.