url drag and drop does not work with firefox if default is chromium

Bug #1035041 reported by stefano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drawers
Fix Released
Medium
Unassigned

Bug Description

When drag and dropping an URL from firefox bar and the following conditions are met:

1. the URL is "masquerated" eg. like this: http://embc2012.embs.org/
 -----> in this case, the text copied is just: embc2012.embs.org

2. the default browser is chromium

the application is not opened by the default browser (chromium).

Indeed:
It **works** if the default is firefox or epiphany/web.
So I am not sure if the bug should address chromium: sorry if this is not the correct place.

System details:
Firefox 14.0.1
Chromium 18.0.1025.168 (Developer Build 134367)
Ubuntu 12.0.4 64bit

Revision history for this message
icb410 (ian-berke) wrote :

Thanks for the bug report. The truncation of the Web address for the name is actually intentional so that the name isn't too long in the iconview. If you right click on the item, you can edit its name the way you want. You can also edit the exec line which is the command that is actually run. The exec line should read:

xdg-open http://....

xdg-open just calls the system default application for the file or url. Please ensure that chromium is actually set as your default browser in System Settings > Details > Default Applications.

If it is set there, open a terminal and do:
xdg-settings get default-web-browser

if that doesn't return chromium.desktop, you can use 'xdg-settings set default-web-browser chromium.desktop'

Let me know what happens.

Ian

Revision history for this message
stefano (loste) wrote :

Hi Ian,
the url is shortened in the exec lineas well: this is what I read from the example above:
xdg-open "embc2012.embs.org"

If it were possible to use the complete url in the exec line, probably the bug would disappear.

Regards

Revision history for this message
icb410 (ian-berke) wrote :

Ok... I can't seem to reproduce your behavior, but something strange is definitely happening when I try to add URLs from firefox. If I click and drag the little icon next to the URL into the drawer, it will NOT add the URL. Furthermore, it breaks more drag and drop events from Firefox to anywhere. However, if I select the text in the URL and drag and drop to the drawer it adds just fine, but only the text that's displayed (so if there's no http://, it's not added). Chrome and Chromium do NOT have this behavior and adding the link either by selecting the text or the icon next to the URL adds the correct protocol (http://, https://) regardless of whether it's shown in the box.

I've investigated further and it seems Firefox's default drag and drop target (text/html) is not the same as chomium/chrome (text/uri-list). I need to correctly figure out how to select and copy the right data during the drag and drop event.

This may take a little bit of time, but in the meantime, you can just edit the Exec line to include the http:// before the web address.

Changed in drawers:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
icb410 (ian-berke) wrote :

I have a fix... Now only uris are accepted at the destination. To drag and drop from firefox, you must use the icon in the address bar. Drag and drop from urls in a page works too.

Here's a patch file if you want to test before the next release (it contains other enhancements too). To use:

cd /opt/extras.ubuntu.com/drawers/drawers
sudo patch < 'pathtofile'/uris.patch

Changed in drawers:
status: Triaged → Fix Committed
icb410 (ian-berke)
Changed in drawers:
status: Fix Committed → Fix Released
Revision history for this message
Ego (egogratis) wrote :

Today i used this feature and it works great but i noticed one problem if i open two pages on for example some news site (same domain) and try to add links for both news it won't work. It only works for one link from the same domain.

Probably something to do with checking duplicate items?

Revision history for this message
icb410 (ian-berke) wrote :

Yes... This was a problem I and someone else encountered recently. He proposed a fix, I just haven't had a chance to test or incorporate. It's bug# 1047139 if you want to check it out.

Ian

Revision history for this message
Ego (egogratis) wrote :

I see already reported. One thought what if behavior would change and number would be added to links or just use full name?

1.) Just leave full name.
2.) Parse names and if same domain already used add number to it.

www.example.com
www.example.com (1)
www.example.com (2)
...

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.