Bug 583185

Summary: Paste into Fedora Component, then Tab, does not select that component
Product: [Community] Bugzilla Reporter: John Reiser <jreiser>
Component: Creating/Changing BugsAssignee: Matt Tyson <mtyson>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 4.2CC: jingwang, mtyson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.4-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-20 07:06:19 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description John Reiser 2010-04-16 19:24:17 EDT
Description of problem: When entering a New bug against a Fedora Component, then Pasting the exact name of the Component (Button1 down, drag across text of component name, Button1 up, move Insertion point to Component text box, click Button2), followed by Tab, does not select that component.  The Component box has the exact name, the list box below it has no change from the original blank form.  If Submit in this state, then Bugzilla complains "No component".  A click of Button1 in the scrolling list box below the Component text box will highlight some Component in blue, but will not change the text box.  If Submit in this state, then the Component will be the one highlighted in the scrolling list box, which usually differs from what was typed.


Version-Release number of selected component (if applicable):
bugzilla-3.4.6+

How reproducible: every time


Steps to Reproduce:
1. New, Fedora, Fedora
2. Paste exact name of a Fedora component into the Component text box, then type <Tab>.
3. 

Actual results: Component whose exact name shows in Component text box is *not* selected.


Expected results: Component whose exact name shows in Component text box *IS* selected.


Additional info:
Comment 1 David Lawrence 2010-08-25 17:43:37 EDT
Red Hat has now upgraded to Bugzilla 3.6 and this bug will now be reassigned to that version. It would be helpful to the Bugzilla Development Team if this bug is verified to still be an issue with the latest version. If it is no longer an issue, then feel free to close, otherwise please comment that it is still a problem and we will try to address the issue as soon as we can.

Thanks
Bugzilla Development Team
Comment 2 John Reiser 2010-08-25 18:13:58 EDT
Yes, this is still a problem.  Pasting the exact name, then typing <Tab>, does not select that exact name from the list box.
Comment 3 Jeff Fearn 2012-05-30 00:46:13 EDT
As part of the recent Bugzilla 4.2 upgrade the Bugzilla team are cleaning up bugs opened against old versions of Bugzilla. This bug has been flagged as an old bug and will be CLOSED WONTFIX in 7 days time.

If you believe this bug is an issue in the latest Bugzilla version please comment on this bug within 7 days. Doing so will ensure this bug is not closed automatically.

Thanks, the Bugzilla team.
Comment 4 Jeff Fearn 2012-05-30 00:46:14 EDT
As part of the recent Bugzilla 2.4 upgrade the Bugzilla team are cleaning up bugs opened against old versions of Bugzilla. This bug has been flagged as an old bug and will be CLOSED WONTFIX in 7 days time.

If you believe this bug is an issue in the latest Bugzilla version please comment on this bug within 7 days. Doing so will ensure this bug is not closed automatically.

Thanks, the Bugzilla team.
Comment 5 John Reiser 2012-05-30 10:43:43 EDT
*** Bug 826579 has been marked as a duplicate of this bug. ***
Comment 6 John Reiser 2012-05-30 10:51:53 EDT
This bug still is present today using Bugzilla 4.2.

I pasted "Bugzilla" into the Component field, then typed <Tab>; there was no change in the list box below the Component field.  Then I clicked on "distribution" in the list box; the Component field continued to display "Bugzilla".  Then I typed "Test of bug 583185" into the Summary field, and clicked the Submit button.  The new bug 826579 came back with Component==distribution, despite "Bugzilla" being listed as the Component at the time that Submit was clicked.

So, the pasting of exact component name, then <Tab>, still does not select the Component whose name was pasted (and still is displayed) in the Component field.

[I closed bug 826579 as duplicate of this one.]
Comment 7 Simon Green 2012-05-30 18:44:40 EDT
*** Bug 826594 has been marked as a duplicate of this bug. ***
Comment 8 Jeff Fearn 2012-06-20 23:53:39 EDT
These bugs have been flagged as still relevant and are being reset to default values for PM consideration.
Comment 9 Simon Green 2012-12-17 00:22:46 EST
Not sure if this can be fixed in YUI 2, but we'll give it a crack.

  -- simon
Comment 12 Matt Tyson 2013-02-18 20:07:31 EST
John:

I'm having trouble replicating this.

Can you tell me what browser and version you are using?

From my testing in Chrome 24.0 it works properly.

I can sometimes replicate the issue in Firefox 18, but I can't replicate it reliably.

Does it consistently fail for you? If you paste the value in and wait a few seconds, does it appear in the drop down list?

> The new bug 826579 came back with Component==distribution, despite "Bugzilla" being listed as the Component at the time that Submit was clicked.

The value that will be submitted to Bugzilla is what is selected in the multi selection box.  The box that you type in is simply a search box for convenience.
Comment 13 John Reiser 2013-02-18 21:52:48 EST
I'm running [now]:
  firefox-18.0-1.fc17.x86_64
  kernel-3.7.3-101.fc17.x86_64
  xorg-x11-server-Xorg-1.12.4-2.fc17.x86_64
  glibc-2.15-58.fc17.x86_64 
  cairo-1.10.2-7.fc17.x86_64
  pango-1.30.0-1.fc17.x86_64
  gtk2-2.24.13-1.fc17.x86_64
  gtk3-3.4.4-1.fc17.x86_64
  gtkmm24-2.24.2-3.fc17.x86_64
  gtkmm30-3.4.2-1.fc17.x86_64
  xulrunner-18.0-6.fc17.x86_64
/var/log/yum.log says it was last run on Feb 10, and "yum update" does show about two dozen packages.  So I will run the update, reboot (kernel has an update), and report what I see.  Meanwhile, here's what I see now:

Yes, I can reproduce this problem every time.  Paste into Component field, then <Tab>, does not trigger a search of the multi-selection box.  The multi box has not scrolled.  The top element "distribution" becomes outlined with a dotted line that is one pixel wide with light blue color.  What I pasted into the field was "bugzilla" without the quotes.  Input focus has shifted to the first line of the multi box; the insertion cursor (a one-pixel wide vertical line in black color) is blinking slowly over the left edge of the first element in the multi box, on top of the dashed blue outline.  If I click in the Component field to the right of the "bugzilla" that is showing, and type a <Backspace>, then the word "bugzilla" appears in a rectangle just below the Component field, in white letters with an all-blue background.  The Component field shows "bugzill" because the final 'a' has been erased by backspacing.  The multi box still has not scrolled.  Now if I type <Tab> then the multi box scrolls, highlights the entry "bugzilla" in white letters on a blue background as the last line of the multi box, and moves the insertion cursor to the very left of the top line of the multi box.  The insertion cursor is somewhat hard to see because it is immediately adjacent to a shadow drawn around the multi box.

One quirk: upon initial drawing in response to New > Fedora > Fedora, once there was no "Component" line at all!  The multi box was immediately below the "Product" field.  I went <Back> and tried again; this time the Component field was displayed.
Comment 14 John Reiser 2013-02-18 22:30:49 EST
"yum update" to:
  firefox-18.0.2-1.fc17.x86_64
  kernel-3.6.11-5.fc17.x86_64
  xulrunner-18.0.2-1.fc17.x86_64
plus 44 more packages, but the others listed in Comment 13 did not change.

Still I can reproduce the problem every time, as in Comment 13.

I notice that the whole window is redrawn after <Backspace><Tab> in the Component field (which caused the multi box to scroll, etc.)  UI elements that are not flush with the left margin have shifted somewhat to the right, and possibly shrunk in width.  In particular, the box labelled "Component Description" is now only about 60% as wide as initially.  This happened before, too; the reason why this is desirable is not obvious to me.

I note that initial entry to "http://bugzilla.redhat.com" displays "Version 4.2.4-7" near the upper right corner, so I change Version of this report to "4.2".
Comment 15 John Reiser 2013-02-18 22:48:40 EST
Oops, the running kernel is:
  kernel-3.7.6-102.fc17.x86_64
(I have 3 of them installed, and I made an error in double-clicking to copy one of the lines reported by "rpm -q kernel" before I pasted it into Comment 14.)
Comment 16 Matt Tyson 2013-02-19 23:09:25 EST
Hi John,

When you paste by right click -> paste, the JS event *is not* triggered.
When you paste by using Ctrl-V, the JS event *is* triggered.

I was using Ctrl-V to paste, which was the source of my confusion in comment 12.

This looks like it is a bug in the YUI2 JavaScript library, which is end-of-life and won't be receiving any more updates.

Bugzilla 5.0 is planning to use YUI3, which should fix this problem.

Unfortunately this can't be fixed.  The only workaround I can provide is to paste using Ctrl-V
Comment 17 Matt Tyson 2013-02-20 00:13:09 EST
Scratch that, There is a workaround for this (see http://yuilibrary.com/projects/yui2/ticket/2528134 )

I've added this YUI JS snippet in and the auto complete now works when you paste text into the search box.
Comment 19 wangjing 2013-05-09 03:24:26 EDT
Verified on qe test env version 4.4.rc2-3(20130426) --> PASS

Verify steps:
1. New a bug with Fedora/Fedora
2. on the Enter Bug page Paste exact name of a Fedora component into the Component search box by right click -> paste,
then expected results: Pasting a component name by right click -> paste into the component search box on the Enter Bug page should now show a drop down list. 
3. then type <Tab>.

then expected results:Pressing tab should select the component with that name in the component select box below.

4. on another Enter Bug page Paste exact name of a Fedora component into the Component search box by using Ctrl-V,
then expected results: Pasting a component name by using Ctrl-V into the component search box on the Enter Bug page should now show a drop down list. 
5. then type <Tab>.

then expected results:Pressing tab should select the component with that name in the component select box below.

Actual results:
same as the expected results above.