Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#1381 closed defect (fixed)

[patch][cla]MenuBar2 causes error on keypress

Reported by: [email protected] Owned by: Adam Peller
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description

Reproducible in "tests/widget/test_Menu2_Bar.html" and "test_Menu2Code.html" with a current SVN checkout in both Firefox and IE, I have not tested other browsers. The specific error I see in Firefox using Firebug is "second argument to Function.prototype.apply must be an array, declare.js (line 127)".

The menu gets created and displayed properly, and even appears to work properly using the mouse. However, press any key on the keyboard and the error is triggered.

This did not happen when I was using 0.3.1, but appeared immediately when I changed over to a dojo source checkout from SVN about a week ago.

Attachments (2)

1381.patch (7.2 KB) - added by [email protected] 14 years ago.
refreshed patch for 1381/1382 - add keyboard control, restore focus back to parent widget,
1381.2.patch (6.8 KB) - added by [email protected] 14 years ago.
refreshed patch for 1381/1382 - add keyboard control, restore focus back to parent widget,

Download all attachments as: .zip

Change History (12)

comment:1 Changed 14 years ago by [email protected]

Correction to my comment above. Pressing any key does not cause the problem, specifically pressing any key besides the arrow keys causes the problem. It appears to be caused by line 1011 of Menu2.js. It is the default case of a select statement on the keycode of the event passed into processKey. Commenting out line 1011 prevents the problem from happening.

comment:2 Changed 14 years ago by Adam Peller

Owner: changed from bill to Adam Peller

doughays says:

easily fixed by changing file: src/widget/Menu2.js: from: rval = this.inherited("processKey", evt); to:

rval = this.inherited("processKey", [evt]);

comment:3 Changed 14 years ago by dylan

Milestone: 0.4
Version: 0.40.3

comment:4 Changed 14 years ago by [email protected]

I did exactly what you suggested when I first encountered the problem, but then I realized I could no longer type spaces into my textboxes. This could possibly be related to ticket 1382 though. The only temporary solution I could come up with for my project was to simply disable the key navigation in the menubar completely.

In relation to both of these tickets, whoever works on the menubar, please test it in combination with other widgets and page elements. The menubar looks and works great on the test page, but it doesn't play well with others.

comment:5 Changed 14 years ago by [email protected]

Please verify this is fixed by applying the test patch attached to ticket #1382.

comment:6 Changed 14 years ago by guest

Summary: MenuBar2 causes error on keypress[patch][cla]MenuBar2 causes error on keypress

Changed 14 years ago by [email protected]

Attachment: 1381.patch added

refreshed patch for 1381/1382 - add keyboard control, restore focus back to parent widget,

Changed 14 years ago by [email protected]

Attachment: 1381.2.patch added

refreshed patch for 1381/1382 - add keyboard control, restore focus back to parent widget,

comment:7 Changed 14 years ago by guest

Cc: [email protected] added

comment:8 Changed 14 years ago by bill

Resolution: fixed
Status: newclosed

(In [5562]) Fix keyboard support for menus. Fixes #1381 and also fixes #1382. Patch from Doug (IBM, CCLA on file).

comment:9 Changed 14 years ago by [email protected]

After manually applying the patch this was fixed. The changes still do not appear to be properly applied to the SVN trunk though.

comment:10 Changed 13 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.