Version: (using KDE Devel) Installed from: Compiled sources window.open(url, target) should reuse the named target window when invoked repeatedly, but it does not for some months now. this is like bug 25639 and bug 71164, except that it is definitely js-related.
more weirdness: if the existing target window has non-html content, then nothing happens - no new window is opened and the old content stays.
This bug is still present in 3.5.3 (from the SuSE 10.1 RPMs). This may have been (temporarily) fixed last year :- http://lists.kde.org/?l=kfm-devel&m=109991180218788&w=2 Very annoying when a Konq upgrade breaks my web app.
Do you have a test-case you can attach to the bug?
are you kidding? <a href="javascript:window.open('http://www.kde.org', 'target')">click me once, click me twice ... thrice ...</a>
Created attachment 16567 [details] Test case No, I am not kidding
The interesting thing is that the normal targeted link also opens multiple windows. This seems to be a regression for bug #25639
This does not appear to behave consistently. What seem inconsequential changes in the page source change the behaviour from opening multiple windows, all reporting the same name (document.write("window.name = " + window.name);), to opening in the same target window. It does not seem to be related to non-html in the target page or to whether the webserver is local or remote (or using konqueror to open a local html file without using a webserver). When I get some spare time (later today) I will post demo pages to a publicly accessible site.
Tested in trunk (rev. 797569). I tested Allan's file and a selfmade file. If the window.open opens a local file, everything works as intended (window.name is correct). The situation is different with distant websites and what was first reported still happens.
Created attachment 24362 [details] fresh testcase (different methods)
Created attachment 24363 [details] popup window
What is your Configuration/Configure Konqueror.../General category/Open links in a new tab instead of a new window checkbox setting? Is it checked or not checked? This is important for this bug. That setting configures the handling of the HTML 4 target attribute specification: this has been specified by the HTML 4 spec and (IIRC) UAAG 1. And by default, it is checked in Konqueror. ---------- > window.open(url, target) should reuse the named target window when invoked repeatedly This is DOM 0: so, strictly speaking, it's undefined. window.open(url, target) may reuse the named target window, but it will NOT [re-]focus (raise on top of other window instances) the existing targeted window. You will need [WindowObjectReference.]focus() if the user settings permits this (it seems that Konqueror 4.3.2 does not by default allow scripters to make use of focus()). IMO, the proper and best coding practice for reusing a window has been defined and explained at window.open() at MDC (best practices) https://developer.mozilla.org/en/DOM/window.open#Best_practices regards, Gérard
Thank you for the bug report. As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.