User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20180214093410 Steps to reproduce: When creating a new bug, entering text into the Summary field causes Bugzilla to search the database for bugs with similar summaries. Unfortunately, this searching appears to trigger on any keystroke, where it should only trigger on keystrokes that change the content of the Summary field (and could thus potentially change the results of the search). Repeating the search for keystrokes that don't change the content of the Summary field just wastes cycles on the Bugzilla servers. Also, changing the summary field without using the keyboard doesn't trigger a search for possible duplicates. Steps to Reproduce: 1. Open https://landfill.bugzilla.org/bugzilla-5.0-branch/enter_bug.cgi?classification=Widgets 2. Type a few random words into the Summary field -- BZ will search for possible duplicates as you type. 3. Press the left arrow key, then observe that the text "Searching for possible duplicates...." appears for a few seconds below the table headings of the Possible Duplicates table, though the contents of the table don't change when the search is complete. 4. Repeat step 3 for various other keystrokes that don't change the content of the Summary field (e.g. Down Arrow, Home, End, Insert, Alt, Ctrl, Shift, CapsLock, Ctrl+A, Ctrl+C, etc). 5. Copy a word into the clipboard. 6. Paste the word into the Summary field with the mouse (i.e. right-click and select Paste from the popup menu). 7. Observe that the search for possible duplicates is not performed. Actual results: Unnecessary search for duplicates is triggered by keystrokes that don't change the Summary field. Necessary search is not triggered by non-keystroke actions that do change the Summary field. Expected results: Search for duplicates whenever the Summary field changes and not otherwise.
This is probably just changing the trigger from the keyup event to the oninput event in YAHOO.bugzilla.dupTable.init ... assuming YUI can cope with modern.
Exactly. It should listen `input` events instead of `keyup`. I’m touching the file in Bug 1380437, will fix this issue once the other bug is solved.
Assignee: create-and-change → kohei.yoshino
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 5.0 → Harmony
Bug 1380437 is currently blocked by test updates. I’m fixing this now.
Status: NEW → ASSIGNED
Component: Creating/Changing Bugs → Bug Creation/Editing
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
Version: Harmony → Production
PR merged to master.
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.