Modify

Opened 14 years ago

Last modified 13 years ago

#8319 new enhancement

[Patch] Add duplicate search to keypress events instead of blur

Reported by: Dan G. Switzer, II Owned by: Ryan J Ollos
Priority: high Component: DuplicateTicketSearchPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I modded this plug-in to support duplicate search as the user's typing--which is a bit more effective and intuitive. To do this, I changed the events to use the keypress and keydown events. In order to improve performance, I use a debounce() technique to make sure that the AJAX call is only called after 1s of delay after the last key press.

I also set the tabindex to the elements in the suggestions to 32767 so that pressing [TAB] takes you to the next Trac field.

I'm attaching a patch of my changes.

Attachments (2)

duplicateticketsearchplugin_keypress.zip (1.2 KB) - added by Dan G. Switzer, II 14 years ago.
Diff patch that implements efficient keypress checking
7382.patch.zip (1.4 KB) - added by Ryan J Ollos 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Dan G. Switzer, II

Diff patch that implements efficient keypress checking

comment:1 Changed 14 years ago by Ryan J Ollos

Owner: changed from gregmac to Ryan J Ollos
Status: newassigned

comment:2 Changed 14 years ago by Ryan J Ollos

Summary: Add duplicate search to keypress events instead of blur[Patch] Add duplicate search to keypress events instead of blur

comment:3 Changed 14 years ago by Ryan J Ollos

Priority: normalhigh

comment:4 Changed 14 years ago by Ryan J Ollos

Thank you for the patch. A couple of issues:

  1. The patch has no header, so I had to apply it manually.
  2. After applying to patch, I get a javascript error debounce is not a function.

I'm going to apply the part of the patch that makes the tab move to the next input field. If you could regenerate the patch with a header so that I can apply it directly, I'd appreciate that.

Changed 14 years ago by Ryan J Ollos

Attachment: 7382.patch.zip added

comment:5 Changed 13 years ago by Ryan J Ollos

Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Ryan J Ollos.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.