Unsorted issues > Bug (done?)

Ctrl-Klick in firefox / #5246

Summary

done?
May 22, 2007
100%
May 22, 2007 / xl
Jun 21, 2007 / xl
tino
 

Attached files

No files uploaded

Issue report

Major
Always
firefox (linux/ubuntu)
0.08
Ctrl-Klick on Link in Task List.
Link is opened in same window.
In firefox Ctrl-Klick opens a link in a new window.
 

8 Comments

pixtur

May 29, 2007
Confirmed...
This is really a pain in the ass. Somehow the assigned click-handler also grabs the CTRL-Click events but removes the modifier key.

I still have no clue how to fix this.


xl

May 30, 2007
Perhaps
...just de-assign the click handler for links. Is jquery used? I begin to like this.

tino

May 30, 2007
Not sure...
I'll take a look at this...

pixtur

May 30, 2007
yeah, it's jquery.
The code can be found in js/listFunctions.js:

The normal clicks are already de-assigned for normal links.

    /**
    * prevent normal links from being overwritten by row toggling
    */
    $('table.list a').click
    (
        function(e)
        {
            document.location.href= this.href;
            return false
        }
    );

tino

Jun 1, 2007
It looks like this...
I played a bit and this is my first result

from js/listFunctions.js

    $('table.list a').click(function(e) {
        if( e.ctrlKey )
        {
        	document.location.href = gBrowser.addTab(this.href);
        	return false;
        }
        else 
        {
            document.location.href= this.href;
            return false;
        }
    });

xl

Jun 3, 2007
solution
one comment to this:
i think this works for me, but not for everyone.

if i understand it right, this emulates firefox standard behabiour.
but ctrl-click in firefox is configurable (open new tab in foreground or in background).

the "real" solution might be to switch off streber click handling for links completely and let firefox do the job.

pixtur

Jun 20, 2007
Antwort auf solution
Could you elaborate a bit more on this? How can this be done...

xl

Jun 21, 2007
let the browser do its work
what i wanted to say:
we should not build a complex click handler but pass on to the browser what is to the browser. (what ctrl-click does is a matter of browser config, not of our javascript!)

i looked a bit into js/listFunctions.js.
the "trouble" code you cited in yeah, it's jquery., what is it good for anyway?
it is commented "prevent normal links from being overwritten by row toggling", but it looks like row toggling is done server side, not javascript.

so the solution woud be to just delete cited code.
 

Comment / Update