[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293169#comment-15293169
 ] 

Bernhard Hablesreiter commented on DELTASPIKE-1149:
---------------------------------------------------

Yes, p:commandLinks, etc. are no issue.

The onclick-function could just be extended with the event, like:

link.onclick = function(evt) {
        if(!evt.ctrlKey)
        {
                if (storeWindowTreeEnabled) {
                        dswh.strategy.CLIENTWINDOW.storeWindowTree();
                }
                if (tokenizedRedirectEnabled) {
                        dswh.strategy.CLIENTWINDOW.tokenizedRedirect(this);
                        return false;
                }
                return true;
        }
};

But there is another case, commented with "prevent double decoration", I'm not 
sure if this has to be taken into account here.
Maybe you could test this solution and add it to the "else"-tree, if necessary.

> Allow the user to open a link in a new tab when holding down the ctrl-key in 
> CLIENTWINDOW mode
> ----------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1149
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1149
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: JSF-Module
>            Reporter: Bernhard Hablesreiter
>            Assignee: Thomas Andraschko
>
> When in CLIENTWINDOW-mode it would be nice if the user is holing down the 
> ctrl-key and clicks a link (get-request link), the DeltaSpike onclick-handler 
> is not being executed, as the user wants this link to be opened in a new tab 
> and a new window-id will be assigned due to the window-name check anyway. Now 
> we have to right-click the link and choose "Open in new tab" to get the 
> desired behaviour, but lots of people are used to open new windows by holding 
> the ctrl-key.
> This also applies to links with a target="_blank" as those should always open 
> in a new tab and the DS onclick-handler could probably be ignored.
> This should of course not affect links with ajax-functionality, e.g. 
> p:commandLink oder f:ajax(ified) links, as they cannot easily be opened in a 
> new window.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to