Opened 7 years ago
Closed 7 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 )
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 7 years ago by
comment:2 Changed 7 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 7 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
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.
Reproduce test case: https://jsfiddle.net/xnwze5Lw/