Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#29367 closed defect (bug) (fixed)

Media Modal: the progress bar for each attachment no longer shows upload progress

Reported by: gcorne's profile gcorne Owned by: azaozz's profile azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch
Focuses: javascript Cc:

Description (last modified by gcorne)

The progress bars in the attachment browser no longer animate when uploading. See https://cloudup.com/cAGpTEdfq6A for a demonstration. The progress bars worked correctly in 3.9.2.

This broke in [29266] because rerenderOnModelChange is set to true so any change triggers the view to re-render. The upload progress isn't handled during a normal Attachment view render, so always re-rendering causes any change to the progress bar to be overwritten.

Attachments (1)

29367-01.patch (1.8 KB) - added by gcorne 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @gcorne
10 years ago

  • Component changed from General to Media
  • Description modified (diff)
  • Focuses javascript added
  • Version set to trunk

#2 @gcorne
10 years ago

  • Description modified (diff)

#3 @gcorne
10 years ago

Actually, it looks like the binding of render to change happened in [28993].

This ticket was mentioned in IRC in #wordpress-dev by gcorne. View the logs.


10 years ago

@gcorne
10 years ago

#5 @gcorne
10 years ago

  • Keywords has-patch added

29367-01.patch fixes the issue by incorporating the percentage of progress into the template that is used to render. So when the change event is firing a re-render, the current percentage is reflected in the width of the progress bar. I handled it this way instead of calling this.progress() after this.$el.html() so that the progress bar wouldn't flicker.

#6 @azaozz
10 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 29609:

Media modal: fix the progress bar in the attachment thumbnail. Props gcorne, fixes #29367

#7 @azaozz
10 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.