Defect #28482

Buttons are disabled when modal is opened again after exporting CSV

Added by Mizuki ISHIKAWA about 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:UI
Target version:-
Resolution:Fixed Affected version:

Description

Steps to reproduce:
  1. Open issues/index.
  2. Click on the "CSV" link to open modal.
  3. Click the export button to export csv.
  4. After exporting csv, click “CSV" link again to open modal.

Expected result:
By export button, you can export csv again.

Result:
CSV can not be exported because export button and cancel button are disabled.

This is a problem only occurring with the trunk .
I think that the cause of this problem is that disable_with option of submit_tag of rails5 is the default.
( https://github.com/rails/rails/pull/21135 )

disable_with is an option to disable the submit button to prevent duplicate transmission.
The export button and cancel button are disabled at the moment of clicking because disable_with is true.
But that buttons do not reload the screen so the buttons will remain disabled.

I have not confirmed, but there may be other buttons that are in the same state.

csv_modal.png (216 KB) Mizuki ISHIKAWA, 2018-04-03 07:28

0001-disable-data-disable-with-for-CSV-exports.patch Magnifier (1.89 KB) Marius BALTEANU, 2018-04-30 10:26


Related issues

Related to Redmine - Feature #23630: Migrate to Rails 5.2 Closed

Associated revisions

Revision 17321
Added by Go MAEDA about 1 year ago

Disable ":disable_with" for CSV exports (#28482).

Patch by Marius BALTEANU.

History

#1 Updated by Go MAEDA about 1 year ago

#2 Updated by Go MAEDA about 1 year ago

  • Category set to UI

#3 Updated by Marius BALTEANU about 1 year ago

I see two possibility here:

1. Disable this feature in the entire Redmine app by setting config.action_view.automatically_disable_submit_tag = false in config/application.rb and enable the feature only where it works as expected (like: #17517).
2. Vice versa, disable only where it doesn't work (like CSV exports).

Because I really like this feature, I would suggest to go with the second option and I made a patch for it.

In addition, I tried to find a way to fix this issue without disabling the data-disable-with feature, but without any luck (excepting adding custom JS code to enable the buttons on show modal).

Also, we should set the target version to 4.0.0. @Go Maeda, can I set it?

#4 Updated by Go MAEDA about 1 year ago

Marius BALTEANU wrote:

Also, we should set the target version to 4.0.0. @Go Maeda, can I set it?

There is no reason why you cannot do it :)

#5 Updated by Marius BALTEANU about 1 year ago

  • Target version set to 4.0.0

#6 Updated by Jens Krämer about 1 year ago

+1, the patch works for me

#7 Updated by Go MAEDA about 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version deleted (4.0.0)
  • Resolution set to Fixed

Committed. Thanks.

#8 Updated by Mizuki ISHIKAWA about 1 year ago

Thank you for all the actions about this issue!

Also available in: Atom PDF