Modify

Opened 4 years ago

Last modified 3 years ago

#8319 new enhancement

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

Reported by: DanSwitzer2 Owned by: rjollos
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 DanSwitzer2 4 years ago.
Diff patch that implements efficient keypress checking
7382.patch.zip (1.4 KB) - added by rjollos 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by DanSwitzer2

Diff patch that implements efficient keypress checking

comment:1 Changed 4 years ago by rjollos

  • Owner changed from gregmac to rjollos
  • Status changed from new to assigned

comment:2 Changed 4 years ago by rjollos

  • Summary changed from Add duplicate search to keypress events instead of blur to [Patch] Add duplicate search to keypress events instead of blur

comment:3 Changed 4 years ago by rjollos

  • Priority changed from normal to high

comment:4 Changed 4 years ago by rjollos

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 4 years ago by rjollos

comment:5 Changed 3 years ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

Action
as new The owner will remain rjollos.
Author


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

 
Note: See TracTickets for help on using tickets.