Page refresh cancels modal dialog

Bug #1357331 reported by Timur Sufiev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Vlad Okhrimenko

Bug Description

If you perform an operation that would display a green success message, but instead of waiting for that message you immediately launch another modal dialog, the modal will be cancelled when the table is refreshed and the message is displayed.

Steps to reproduce:
1. Go to Admin > Flavors and Edit a flavor.
2. Press Save (you don't even have to make any changes first)
3. After 'Working...' spinner disappears and the table is drawn and before the success message is displayed, immediately Edit another flavor (or even the some one, it doesn't matter).
4. The 'Loading...' spinner appears, and you may even get to see the dialog briefly.
5. The screen jumps back to the table (cancelling your dialog) and displays the 'Success' message.

This bug not only spoils UX, but also forces to add `time.sleep` into integration tests to make them pass.

description: updated
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

I have not been able to reproduce the behavior described here, but I can get a similar behavior by skipping the wait in #3. In other words:
1. Go to Projects, click on 'Modify Quotas' for some project.
2. After quotas tab in modal form appears, change some quota value, click 'Submit'.
3. After 'Working...' spinner disappears and the table is drawn, BEFORE the success message is shown (you may have to be fast here), click on Modify Users (you can also click on Modify Quotas, but Modify Users is faster because there is no pulldown to wait for)
4. The 'Loading...' spinner appears, but when the Success message occurs (from the quota modification), the opening of the new modal will be aborted.

Is this the same behavior that you are seeing?

Changed in horizon:
status: New → Incomplete
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Yes, it is the same one! I was not fast enough to open another modal before success message appears :). But the Selenium in integration tests could do it.

Changed in horizon:
status: Incomplete → Confirmed
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

I actually see this common behavior in a number of places in horizon. Basically if you try to bring up a modal dialog before the success message has been shown, the success message will interrupt the modal, even if the modal is already being displayed.

summary: - Delayed page reload after modal submit causes another modal to not open
+ Success message cancels modal dialog
Revision history for this message
Timur Sufiev (tsufiev-x) wrote : Re: Success message cancels modal dialog

Gary, it seems to me that not the success message interrupts the modal, but the succeding page reload (caused by django redirect, which is used in Horizon to refresh the page after some changes were made in modal) does it.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

(Modified the bug description to show steps that are a bit easier to reproduce)

description: updated
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
Gary W. Smith (gary-w-smith) wrote : Re: Page refresh message cancels modal dialog

Timur: Thanks, that is a more accurate description. I adjusted the text and header accordingly.

summary: - Success message cancels modal dialog
+ Page refresh message cancels modal dialog
description: updated
summary: - Page refresh message cancels modal dialog
+ Page refresh cancels modal dialog
Changed in horizon:
assignee: nobody → Vlad Okhrimenko (vokhrimenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/119793

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/119793
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f84243074851388f3b06ab8ec20eba1d804f75a5
Submitter: Jenkins
Branch: master

commit f84243074851388f3b06ab8ec20eba1d804f75a5
Author: Vlad Okhrimenko <email address hidden>
Date: Mon Sep 8 18:25:58 2014 +0300

    Disable buttons opening the modal forms on page unload

    If button which opens a modal form is clicked after page started
    reloading, form will disappear once reload is finished. To avoid this
    glitch make user unable to press such buttons until reload finishes.

    Change-Id: Id81a5e108644f99ee939296b54835f4f4ac2aaa7
    Closes-Bug: #1357331

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → juno-rc1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.