Closed Bug 329825 Opened 18 years ago Closed 18 years ago

ctrl-clicking on javascript: link fails in new tab

Categories

(Firefox :: Tabbed Browser, defect)

1.5.0.x Branch
x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 55696

People

(Reporter: Geoffrey.R.Gustafson, Unassigned)

Details

When you ctrl-click on a javascript: link, Firefox currently seems to open a new tab and evaluate the Javascript in the context of the blank page (i.e. no symbols defined).

At least in the case where the Javascript ends up submitting a form, it seems to me the correct behavior would be to open a new tab that performs the resulting post or get.

This doesn't seem terribly easy to implement, but I think it's doable. It seems to me the Javascript engine could record that it is executing in the context of a middle-click. It goes ahead and executes within the sane Javascript context of the current page, but then if it comes to certain events, such as form submission or loading a URL, it would open a new tab to do so, by checking that middle-click context flag. Then if the Javascript completes processing the DHTML event without seeing a qualifying event, it throws out that middle-click context  without having opened a new tab, and the users realize they were silly.

Or I could easily be missing some reason it needs to function the way it does for some other situation. Just an idea.

I looked through quite a few BZs and didn't see this, sorry if it's a dup.

Seen in 1.5.0.1 on Linux.

*** This bug has been marked as a duplicate of 55696 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.