Skip to content

Commit

Permalink
Merge pull request #225 from yandex-ui/cmd.click
Browse files Browse the repository at this point in the history
Не работает cmd+click на ссылках
  • Loading branch information
edoroshenko committed May 5, 2014
2 parents e8f2971 + 832cdbe commit e34e85d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ns.action.js
Expand Up @@ -190,10 +190,13 @@
if (!href) {
return true;
}

if (HREF_JS_REGEXP.test(href)) {
return false;
}
if (href.indexOf('conf:sip:') === 0 || href.indexOf('meet:sip:') === 0) {

// Чтобы работал Cmd/Ctrl/Shift + click на ссылках (открыть в новом табе/окне).
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
return true;
}

Expand All @@ -202,8 +205,8 @@
return true;
}

//TODO: HISTORY_API_SUPPORT: hash или не хеш
//могут быть ссылки <a href="#hash" target="_blank"/>
// TODO: HISTORY_API_SUPPORT: hash или не хеш
// могут быть ссылки <a href="#hash" target="_blank"/>
if (target.getAttribute('target') !== '_blank') {
returnValue = ns.page.go(href);
if (returnValue instanceof no.Promise) {
Expand Down

0 comments on commit e34e85d

Please sign in to comment.