Fixed the Update -> Add File review request action not responding to clicks.

Review Request #9207 - Created Sept. 22, 2017 and submitted

Nicholas Mercier
Review Board
master
4592
d2db62d...
reviewboard, students

In the Review Request screen, clicking Update -> Add File would not do
anything.

The Update element's click event is registered before the Add File
element's click event. As a result, the Update element's click event is
firing before, eating up the Add File's click event and thus causing the
upload file dialog to never appear.

The onUploadFileClicked() function was moved from ReviewablePageView to
ReviewRequestEditorView, and the element's handler registered in the
setupActions() function. The .has-menu handler was moved to
ReviewablePageView, better respecting the ownership structure of the
page. This changes the order in which the click events are fired, allowing
the onUploadFileClicked() function to actually fire in response to the
Add File element being clicked.

Furthermore, the has-menu handler was moved from
ReviewRequestEditorView to ReviewablePageView

After the fix, the upload file dialog appears as intended.

Ran JSTests.

Tested manually by clicking Update -> Add File, where the upload file
dialog appears. This was done on both computer and mobile browsers.

  • 0
  • 0
  • 18
  • 0
  • 18
Description From Last Updated
Christian Hammond
Christian Hammond
Barret Rennie
Nicholas Mercier
Barret Rennie
Nicholas Mercier
Nicholas Mercier
David Trowbridge
Nicholas Mercier
Barret Rennie
Nicholas Mercier
Barret Rennie
Nicholas Mercier
Barret Rennie
Nicholas Mercier
Barret Rennie
Nicholas Mercier
Barret Rennie
Christian Hammond
Christian Hammond
Nicholas Mercier
Christian Hammond
Nicholas Mercier
David Trowbridge
Nicholas Mercier
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (ccb6ce7)
Loading...