Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#20885 closed defect (bug) (fixed)

JS console error with comment keyboard shortcuts

Reported by: tw2113 Owned by: ryan
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch commit
Focuses: Cc:


Keyboard shortcuts for comment moderation are throwing console errors and not doing intended results due to it.

The console error:

TypeError: e.all[o] is undefined

Line 21

Attachments (4)

20885.patch (12.6 KB) - added by SergeyBiryukov 9 years ago.
20885.2.patch (1.0 KB) - added by SergeyBiryukov 9 years ago.
20885-3.patch (1.9 KB) - added by azaozz 9 years ago.
20885.4.patch (1.8 KB) - added by SergeyBiryukov 9 years ago.
Same as 20885-3.patch, with better formatting

Download all attachments as: .zip

Change History (21)

#1 @ocean90
9 years ago

Please define SCRIPT_DEBUG and check your console again.

#2 @tw2113
9 years ago

With Script Debug turned on. Sorry about that part.

TypeError: that.all[element] is undefined
Line 84

#3 @SergeyBiryukov
9 years ago

Hmm. Not sure what's going on, but I see the same error in all releases back to 2.7 when the shortcuts were introduced. Tested in Firefox 12 by pressing j/k on the Comments screen.

#4 @SergeyBiryukov
9 years ago

Works fine (including current trunk) in Chrome 19 and Opera 11.64.

Doesn't work in IE 8 (same error as in Firefox).

#5 @SergeyBiryukov
9 years ago

FWIW, works in Firefox 3.6.25.

#6 @tw2113
9 years ago

I'll add in that it wasn't working in Firefox 14 and didn't change for 15. I run their Aurora channel and it updated today. Still the same errors.

#7 follow-up: @SergeyBiryukov
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release

Updating jQuery Hotkeys plugin to 0.8+ (https://github.com/tzuryby/jquery.hotkeys) fixes the issue.

#8 @SergeyBiryukov
9 years ago

  • Keywords needs-testing added

#9 @ocean90
9 years ago

Related/duplicate: #19489

#10 in reply to: ↑ 7 @azaozz
9 years ago

Replying to SergeyBiryukov:

Updating jQuery Hotkeys plugin to 0.8+ (https://github.com/tzuryby/jquery.hotkeys) fixes the issue.

Yes, but also requires a lot of changes to table-hotkeys.dev.js as the plugin is completely different (for the better).

If we want this in 3.4 perhaps we can fix the old plugin, seems there is quite a bit of outdated code there but disabling some of the unnecessary things makes it work again.

#11 follow-up: @SergeyBiryukov
9 years ago

20885.2.patch seems to fix the issue in the old plugin.

9 years ago

#12 in reply to: ↑ 11 @azaozz
9 years ago

Replying to SergeyBiryukov:

Ah, you beat me to it :)

Yes, that was the problem, seems to work in all browsers now.

#13 @SergeyBiryukov
9 years ago

Some more testing without the patches: worked in Firefox 9, stopped working in Firefox 10.

#14 @azaozz
9 years ago

  • Keywords commit added; needs-testing removed
  • Milestone changed from Future Release to 3.4

Tested in all supported browsers, works.

#15 follow-up: @ryan
9 years ago


9 years ago

Same as 20885-3.patch, with better formatting

#16 in reply to: ↑ 15 @azaozz
9 years ago

Replying to ryan:


Yes, 2.patch fixes the problem, 3.patch also removes some unneeded checks that are handled by jQuery now and 4.patch fixes the formatting. All three patches work with 4.patch being the best to go in.

#17 @ryan
9 years ago

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

In [21035]:

Fix comment hotkeys for FF and IE. Props azaozz, SergeyBiryukov. fixes #20885

Note: See TracTickets for help on using tickets.