Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Mail links handling #106

Merged
merged 2 commits into from
Dec 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kdf",
"version": "0.1.10",
"version": "0.1.11",
"description": "KD: a non-document focused UI Framework for web applications.",
"main": "gulpfile.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/core/windowcontroller.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ module.exports = class KDWindowController extends KDController
if nearestLink?.target?.length is 0 # links with a target attribute should work as normal.
href = nearestLink.getAttribute "href"
isHttp = href?.indexOf("http") is 0
isMail = href?.indexOf("mailto") is 0
if isHttp
nearestLink.target = "_blank"
else
else if not isMail
e.preventDefault()
if href and not /^#/.test href
KD.getSingleton("router").handleRoute href
Expand Down