Opened 6 years ago

Closed 6 years ago

#15150 closed bug (notabug)

progressbar.value() doesn't work when passing non-integer value (like: float)

Reported by: Jeff Owned by:
Priority: minor Milestone: none
Component: ui.progressbar Version: 1.12.0
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Ryan J Ollos)

I use jQuery UI (v1.12.0) progressbar to display file upload progress, I calculated my progress with var percent = (offset/lenght).toFixed(), but when I pass value by using progressbar("value", percent);, progress bar can't display current percent.

My team member can re-produce this issue, and has found a workaround solution: percent = parseInt(percent) to force convert value to integer, then works.

Change History (3)

comment:1 Changed 6 years ago by Jeff

Reproduce test case:

comment:2 Changed 6 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 6 years ago by Scott González

Resolution: notabug
Status: newclosed

You're not passing a float (there's no distinction between integer and float in JavaScript), you're passing a string, which isn't a valid value.

Note: See TracTickets for help on using tickets.