13023: Workaround firefox copy&paste bug on jobs & pipeline log viewers.
[arvados.git] / apps / workbench / app / views / application / report_issue_popup.js.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 $("#report-issue-modal-window").html("<%= escape_javascript(render partial: 'report_issue_popup') %>");
6 $("#report-issue-modal-window .modal").modal('show');
7
8 // Disable the submit button on modal loading
9 $submit = $('#report-issue-submit');
10 $submit.prop('disabled', true);
11
12 // capture events to enable submit button when applicable
13 $('#report_issue_text').bind('input propertychange', function() {
14   var problem_desc = document.forms["report-issue-form"]["report_issue_text"].value;
15   $submit.prop('disabled', (problem_desc === null) || (problem_desc === ""));
16 });