I am having trouble opening a modal in Microsoft Edge only.
The link to open the modal is:
<%= link_to the_path, class: "btn btn-tertiary class-used-to-find-the-link", data: {"things-id" => 4, "other-things-id" => 7} do %>
  <span>The Link's Text</span>
<% end %>
The JavaScript for the link is:
$('class-used-to-find-the-link').click(onClick);
The onClick method mentioned above would be something like:
onClick   =   function(event) { 
                 //blah..blah...blah
              };
The .click does not get triggered in IE Edge only but works in all other browsers. This link above is supposed to open a modal. I have other instances of .click that don't open modals and these are fine.
So, I think it may be related to the discussion here: Microsoft Edge: onclick event stops working?. Similar to the post linked, when I refresh the page the link does work and the modal opens.
Also, if I firstly open the page that contains the link to click in another tab, via right click and 'Open In New Tab', then the link will also work.
I have tried some of the answers in the post I have linked, including mousedown and mouseup but these didn't work.
Any help is appreciated.