Opened 9 months ago

Closed 9 months ago

Last modified 2 weeks ago

#1405 closed defect (fixed)

Get rid of code using the window.event object

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: trivial Milestone: Reggie v4.40
Component: net.sf.basedb.reggie Keywords:


I found an event handler that didn't define a parameter for the event object:

hisat.validateStep2 = function()
   if (!clusterIsValid) event.preventDefault();

The code works because the event object is defined as a global variable in window.event that is holding the "current" event. This has been deprecated for some time:

The fix is to define a parameter for the function:

hisat.validateStep2 = function(event)
   if (!clusterIsValid) event.preventDefault();

The same mistake is probably present in other places.

Change History (2)

comment:1 Changed 9 months ago by Nicklas Nordborg

Resolution: fixed
Status: newclosed

In 6824:

Fixes #1405: Get rid of code using the window.event object

I found a few more places with this issue.

Thanks to the code-checking functionality in Eclipse I also found several other things (mostly unused variables) that I also fixed.

comment:2 Changed 2 weeks ago by Nicklas Nordborg

In 7172:

References #1405: Add a link to view the JSON file for specimen that has been imported to the Case summary

Only users with admin or patient curator permissions are allowed to view the file so we need to handle the exception.

Note: See TracTickets for help on using tickets.