Progress bar updated but not displayed correctly

91 views
Skip to first unread message

DevelopDaily

unread,
Oct 20, 2012, 9:32:28 PM10/20/12
to native-cli...@googlegroups.com
The tag <progress id="id200" value="0" max="100"></progress> is placed in the HTML. When a progress value is received from the NaCl to the JavaScript, it attempts to update the "value". I can observe the "value", which reaches 100 eventually, in the HTML source code, but the progress bar doesn't move to 100% graphically.

Just for troubleshooting, another tag <code id="id300"></code> is placed after the progress tag. The same progress value is used to update the "innerHTML" of the tag. I can see the number is displayed from 0 to 100 as the value progresses from the beginning to the end.

I suspect that could be a progress bar specific bug in the Chrome.

Any comments?

Alan Wolfe

unread,
Oct 20, 2012, 9:35:37 PM10/20/12
to native-cli...@googlegroups.com
i'd wager it's a logic problem on your end.

i dont mean to be a jerk by saying this, just using occam's razer.  it's more likely you are doing something wrong than a core html feature being broken in a major browser, which no one else has noticed :P

if not, hopefully someone else has a more useful comment!


--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/vzTG6s5LbrcJ.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.

Andrey Khalyavin

unread,
Oct 21, 2012, 2:39:43 AM10/21/12
to native-cli...@googlegroups.com
This shouldn't depend on NaCl module, right? Can you upload a simple html page that reproduces this? What is your Chrome version and OS?

Andrey Khalyavin

DevelopDaily

unread,
Oct 21, 2012, 5:47:45 PM10/21/12
to native-cli...@googlegroups.com
It's perhaps unrelated to the NaCl.

Two progress bars are in the source, one hard-coded and the other dynamically added by the JavaScript, the former being always good and the latter problematic. If I comment out the "Problem line 1" or "Problem line 2" or both, the bar will work correctly. It seems the presence of both will stop moving the progress graphically. But the hard-coded one has both and always works. I can't get my head around the behaviors.

Here is my browser info:

Google Chrome22.0.1229.94 (Official Build 161065) m
OSWindows
WebKit537.4 (@130860)
JavaScriptV8 3.12.19.15
Flash11.4.31.110
User AgentMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4


Here it is the HTML file.
=======================
<html
<head>
<script type="text/javascript">
  function add_progress_bar()
  {
    bad = document.createElement("progress");
    bad.id="bad";
    bad.max="100";

    bad.value="1";                //Problem line 1
    bad.style.border="solid red"; //Problem line 2
   
    document.getElementsByTagName('body')[0].appendChild(bad);
  }
 
  function value_1_to_100()
  {
    for(var i=1;i<=100;i++)
    {
      document.getElementById('good').value=i;
      document.getElementById('bad').value=i;
    }
  }
</script>
</head>

<body onload="add_progress_bar();">
    <button onclick="value_1_to_100()">Click</button>

    <progress id="good" max="100" value="1" style="border:solid red"></progress>
</body>

</html>

Andrey Khalyavin

unread,
Oct 22, 2012, 3:11:15 PM10/22/12
to native-cli...@googlegroups.com
I confirm this issue in dev chrome version. Looks like a chrome bug to me. I will investigate this further tomorrow.

Andrey Khalyavin

Andrey Khalyavin

unread,
Oct 23, 2012, 1:22:53 PM10/23/12
to native-cli...@googlegroups.com
I filed bug http://code.google.com/p/chromium/issues/detail?id=157332 . You can star it to follow its status.

Andrey Khalyavin
Reply all
Reply to author
Forward
0 new messages