Opened 5 months ago

Closed 5 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 (1)

comment:1 Changed 5 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.

Note: See TracTickets for help on using tickets.