Opened 14 years ago

Closed 14 years ago

#856 closed defect (fixed)

ContextMenu event handler oddity

Reported by: ray Owned by: gogo
Priority: normal Milestone:
Component: Plugin_ContextMenu Version:
Severity: normal Keywords:


Have a look at context-menu.js, line 287:

if (!self.currentMenu) {
	alert(HTMLArea._lc("How did you get here? (Please report!)", "ContextMenu"));
	return false;

This looks like an exception that never really should happen, but in fact it happens almost certainly (at least in Firefox). Just click a few times left and right in turn. Once the case, each of the next unforeseeable amount of clicks in the document results in the alert and sometimes (not always) keyboard input is disabled, too (every key including F5).

Anyone an idea how to handle this?

Change History (1)

comment:1 Changed 14 years ago by ray

  • Resolution set to fixed
  • Status changed from new to closed

The solution is as simple as logical! Left-clicking in the document calls a function that releases onclick events whereas right-clicking when a context menu was already there removed this, but added additional onclick handlers, so they were piling up.

The change which I suppose to be quite reasonable is to call the closing function also oncontextmenu to keep the event listeners in control.

Submitted rev. 597

Note: See TracTickets for help on using tickets.