Opened 19 months ago

Closed 18 months ago

Last modified 10 months 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 by Nicklas Nordborg, 18 months ago

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 by Nicklas Nordborg, 10 months ago

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.