filechoosers auto complete selection stolen by clipboard programs

Bug #78510 reported by Manuel López-Ibáñez
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTK+
Expired
Medium
One Hundred Papercuts
New
Undecided
Unassigned
firefox-3.0 (Ubuntu)
Invalid
Undecided
Unassigned
gtk+2.0 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Steps to reproduce:

Enable a clipboard program such as Klipper/Glipper/Parcellite then:

1. Attach a file in gmail by clicking on browse. A file selection dialog (File Upload) appears.
2. Write on location the path to a file which will be auto-completed as you write. Use a filename that shares the beginning of the name with other files in the same directory. For example, foo/barbarbar and foo/barfoobar
3. When the filename you are looking for appears completed in the location bar press enter.
4. The filename selected will be foo/bar which does not correspond to any existing file.

Problem (copied from upstream):

The problem is that the file chooser's entry uses the selection in GtkEntry to
hold state about "this is what will be inserted if the user hits Tab", but
klipper steals the selection ownership.

Revision history for this message
Alex Latchford (alex.latchford) wrote :

Howdy manu,

Thank you for the bug report, I cannot seem to reproduce this bug..

I have made two files.. /home/alex/foofoobar & /home/alex/foobarbar

I have used the dialogue box to enter the path to /home/alex and then when I select f and hit tab nothing occurs and I have to manually input the rest of the string.. Can you confirm that this happens every time across multiple websites, incidentally I think this is more a problem with the browse feature which is not just Firefox specific if this is indeed a problem..

Thanks again, Alex.

Changed in firefox:
assignee: nobody → mozillateam
status: Unconfirmed → Needs Info
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Hi Alex,

I am using firefox in Edgy. You don't need to press tab, autocompletion should show you foo when you write f if there is no other files in /home/alex that start with f (it does for me). Then, you write b and it auto-completes to foobarbar. Then you hit enter to accept this and the filename turns out to be just foo.

Moreover, I can reproduce it also in Dapper just here in launchpad. Click in Browse in the Include attachment thing. The press Ctrl+L to bring up the Open Location dialog (in Edgy this is always shown). Then write Exa and it will autocomplete to Examples/ and put the cursor after the slash, then write k and it will autocomplete to kubuntu-leaflet.png then hit enter and it will try to open Examples/k . I can reproduce this as often as I wish.

Revision history for this message
Alex Latchford (alex.latchford) wrote :

Howdy manu,

I can reproduce this, however I am unsure of exactly what the expected behaviour should be here, what would you do to change this, because in all honesty I cannot see a viable method of selecting past there without having to manually type in the next letter, which appears to work perfectly, as a result of this I am going to close this as will not fix.

If you can provide a solution to this problem then feel free to reopen it, however I cannot see how this behaviour can be changed to select the correct file..

Thanks again, Alex.

Changed in firefox:
assignee: mozillateam → nobody
status: Needs Info → Rejected
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

The expected behaviour is that if an existing file is shown in the input file and I hit enter, then I want to select that file and not the string up the last key pressed. I think we are not understanding each other here. Let me explain again.

I write: Exa
Filedialog shows: Examples/
I write: k
Filedialog shows: Examples/kubuntu-leaflet.png
I hit ENTER to select that file and I get the following error:
Could not retrieve information about the file
Error getting information for '/home/manu/Examples/k': No such file or directory

This is here in launchpad and in gmail in Dapper's Firefox. I can post screenshots of each step if you wish.

If you don't know how to fix it (because it is a problem of GTK), at least don't reject it or move it to GTK.

I mean, it is such an obvious bug and so easy to reproduce that it is certainly discouraging that you just close the bug.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

OK. I will do it myself. I have just reproduced the bug in Synaptic, so I guess that it is a general GTK bug.

(Argh, I am looking forward to the day that applications will use the dialogs of the DE they are running on, instead of the particular toolkit they use to show their GUI, or at least a firefox version using KDE dialogs.)

Changed in firefox:
status: Rejected → Unconfirmed
Revision history for this message
Alex Latchford (alex.latchford) wrote :

Hello manu,

I think I misunderstood this bug, I was under the impression that this was not a bug because the auto-completion appeared to work fine for me.. Just you have to usually put in more than 1 letter occasionally after the auto-completion is done, then it will re-run itself to get the correct path.. Maybe when selecting is finished and it has produced a bad file-path, (through the method that you stated), that it produces error message stating that the file doesn't exist.. (I think that this is what you wanted to occur right?)

I am sorry to have hastily closed the bug report, I see your point about the bug more clearly now..

Thanks again, Alex.

Revision history for this message
Freddy Martinez (freddymartinez9) wrote :

Manu, please post screenshots so we can better understand your problem. Thanks.
--
Freddy Martinez

Changed in gtk+2.0:
status: Unconfirmed → Needs Info
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Let me know if you need anything else.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

I also get the error if I type Examples/ completely and then press k and ENTER.

Revision history for this message
Sebastien Bacher (seb128) wrote :

works fine with epiphany-browser for me, do you have the problem with something else than firefox? Doesn't look like a GTK bug to me

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

With Synaptic and Thunderbird. (running under KDE, this is Kubuntu).

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Also GIMP.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Marking unconfirmed then, that works fine for me, maybe somebody else will get the problem and can look if that's known upstream

Changed in gtk+2.0:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Needs Info → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

maybe you could describe some step with GIMP on edgy (GTK changed since dapper so it would be better to have an example on edgy or feisty)

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

In Edgy things get weirder:

*) I cannot reproduce the bug in GIMP on edgy, everything works as expected.

*) In synaptic I cannot reproduce the bug either but I cannot select any file at all, when I hit ENTER nothing happens :(

*) I can easily reproduce the bug on Firefox and Thunderbird.

Revision history for this message
Sebastien Bacher (seb128) wrote :

if that happens only with firefox and thunderbird I would say that's a bug from those applications then

Revision history for this message
Qishuai Liu (lqs) wrote :

It seems fixed in feisty.

Changed in gtk+2.0:
status: Unconfirmed → Fix Released
status: Fix Released → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

manu, is that fixed for you?

Changed in gtk+2.0:
status: Unconfirmed → Rejected
Changed in gtk+2.0:
status: Rejected → Needs Info
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Still present in Feisty, at least in Firefox and Thunderbird. These are the only gtk applications I have installed.

Changed in gtk+2.0:
status: Needs Info → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

looks like a firefox bug, I don't get it on feisty though, ctrl-L change the focus to the location entry which doesn't do completion

Changed in gtk+2.0:
assignee: desktop-bugs → nobody
status: Confirmed → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

in fact the completion works correctly

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

It does completion but it is broken. Am I making this up because I am bored? You have screenshots above of each step and they still work for me. Yet another example:

$ cd ~
$ mkdir Examples
$ touch Examples/foofoobar
$ touch Examples/foofoobar
$ firefox https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/78510
Click Browse... near "Include attachment"
Ctrl+L shows the location entry, if it is already shown then you are already doing something different
Write Examp until the cursors jumps after /, this is mainly random, sometimes it jumps after Exa, sometimes after Examp, sometimes it shows the completion but never jumps. If it doesn't jump, press Ctrl+L and start writing Exa again.
Write f. It autocompletes to Examples/foofoo and places the cursor after the last o
Write b. It autocompletes to Examples/foofoobar
Hit Enter.
The Attachment field shows: /home/manu/Examples/foofoob
Hit the monitor with the head.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

The second touch is supposed to be:

$ touch Examples/foofoofoo

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

OK. Now I know I am not crazy. Here is another guy suffering from this:
http://we.hates-software.com/index_15.html (search for gtk).

Changed in firefox:
assignee: nobody → mozilla-bugs
Revision history for this message
John Vivirito (gnomefreak) wrote :

manu,

 What happens if you try with a new profile, does it still happen the same way? I am unable to reproduce this on Feisty. To set up a new profile to test please see:
https://wiki.ubuntu.com/MozillaTeam/Bugs
or try running it in safe mode example: firefox -safe-mode and see if it still happens for you. Please let me know if this happens with new profile or safe-mode.

Changed in firefox:
status: Unconfirmed → Needs Info
Revision history for this message
Alexander Sack (asac) wrote :

we need a tester to push this further.

Revision history for this message
Adam (adam.russell) wrote :

This happens for me, as well. It's very annoying. If I could just disable the auto completion I'd be perfectly happy.

I always end up doing something like this...

(dialog opens)
I type: /usr/bin/ktorrent
I end up with something like /usr/bin/in/ktorrent.

Personally I'd rather just type my filename than have to wait and look for an autocompletion option.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

John,

I can reproduce this here in this very same webpage in Firefox 3 in Hardy whenever I wish with several files. It also happens in gmail.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

I forgot to mention that I can also reproduce this in safe mode.

Revision history for this message
Alexander Sack (asac) wrote :

anyone can make a screenshot that shows where you type the location and what gets cut?

Changed in firefox:
assignee: mozilla-bugs → nobody
Revision history for this message
Alexander Sack (asac) wrote :

... and please test whether this still happens on ffox 3.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Screenshots are already there. Now the location entry is within the file dialog instead of a pop up but everything else is pretty much the same.

A step by step procedure is also above. If you have the location bar but don't have autocompletion, press Ctrl + l (L downcase) two times and it should work. If you cannot reproduce it, then we must have different things installed. I am in Kubuntu Hardy and have very few gnome programs (gimp, inkscape, synaptic, probably that is all). It happens with synaptic and inkscape and it doesn't happen with gimp.

And I said above: "I can reproduce this here in this very same webpage in Firefox 3 in Hardy whenever I wish with several files. It also happens in gmail. I forgot to mention that I can also reproduce this in safe mode."

This is not really big deal. This fails so reliably that I know already that the autocompletion will cut the filename. The workaround is to delete the last letter and type it again.

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

And this is not incomplete. It may be unconfirmed if no one else can reproduce it. But I have given all information that has been requested.

Changed in firefox-3.0:
status: Incomplete → New
Revision history for this message
Adam (adam.russell) wrote :

I am guessing one problem with this bug is that it really needs upstream attention, and there's not enough information to tell whether the problem lies with Firefox or GTK itself. The problem may well even lie with KDE.

Manu, you say the problem happens in Synaptic and Inkscape, as well? That would lead me to believe that there is a problem with GTK. Perhaps there is an parameter in the API that disables autocompletion, and GIMP uses it, so it is not affected (or vice versa).

Revision history for this message
Alexander Sack (asac) wrote :

is this the gtk file dialog where this happens? if so its gtk. otherwise firefox.

Changed in firefox-3.0:
status: New → Incomplete
Revision history for this message
Adam (adam.russell) wrote :

Yes, the GTK file dialog. Not the XUL file dialog.

Perhaps it is this bug: http://bugzilla.gnome.org/show_bug.cgi?id=333320 .

Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

Adam,

That seems to be the bug!

I have tried the work-around mentioned there (to remove klipper from the panel), and I cannot reproduce this anymore. If it is not the same bug, then it is strongly related. Of course, removing klipper is not an option.

Changed in gtk+2.0:
assignee: nobody → desktop-bugs
status: Incomplete → Triaged
Changed in gtk:
status: Unknown → New
Changed in gtk:
status: New → Confirmed
Revision history for this message
Manuel López-Ibáñez (manuellopezibanez) wrote :

As long as the gtk dialog is the only file dialog in firefox. This is also a bug in firefox.

Revision history for this message
John Vivirito (gnomefreak) wrote : Re: [Bug 78510] Re: file dialog cuts filename

On 04/03/2009 05:05 AM, manu wrote:
> As long as the gtk dialog is the only file dialog in firefox. This is
> also a bug in firefox.
>
> ** Also affects: firefox-3.0 (Ubuntu)
> Importance: Undecided
> Status: New
>
Thanks you for the update. Marking incomplete for now until we figure
out what causes this

  status incomplete

--
Sincerely Yours,
    John Vivirito

https://launchpad.net/~gnomefreak
https://wiki.ubuntu.com/JohnVivirito
Linux User# 414246

"How can i get lost, if i have no where to go"
    -- Metallica from Unforgiven III

Revision history for this message
John Vivirito (gnomefreak) wrote :

On 04/03/2009 05:05 AM, manu wrote:
> As long as the gtk dialog is the only file dialog in firefox. This is
> also a bug in firefox.
>
> ** Also affects: firefox-3.0 (Ubuntu)
> Importance: Undecided
> Status: New
>
this is being fixed in GTK not so much a firefox bug but we will wait
for Gnome to fix this and see hat happens

--
Sincerely Yours,
    John Vivirito

https://launchpad.net/~gnomefreak
https://wiki.ubuntu.com/JohnVivirito
Linux User# 414246

"How can i get lost, if i have no where to go"
    -- Metallica from Unforgiven III

Changed in firefox-3.0 (Ubuntu):
status: New → Incomplete
Changed in gtk:
importance: Unknown → Medium
Changed in hundredpapercuts:
milestone: none → raring-gtk
Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Invalid
summary: - file dialog cuts filename
+ filechoosers auto complete focus stolen by clipboard programs
description: updated
summary: - filechoosers auto complete focus stolen by clipboard programs
+ filechoosers auto complete selection stolen by clipboard programs
description: updated
Changed in gtk+2.0 (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Changed in gtk:
status: Confirmed → Incomplete
Changed in gtk:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.