Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Commit

Permalink
BUG #26 A tag with child HTML elements not routed.
Browse files Browse the repository at this point in the history
Fixed in browsers which do not support the path property on an event that
when clicking on a non-link it doesn't cause a javascript error.
  • Loading branch information
mlowen committed May 31, 2016
1 parent b6965cc commit c6e59e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/knockout-singlepage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ var KnockoutSinglePage = function () {
current = current.parentNode;
}

element = current;
if (current.tagName)
element = current;
}

return element;
Expand Down Expand Up @@ -83,6 +84,8 @@ var KnockoutSinglePage = function () {
if (!element)
return;

console.log(element);

// This feels hacky but it works, as best as I can tell there
// is no way to programmatically determine if there is a
// particular knockout binding on an element.
Expand Down

0 comments on commit c6e59e4

Please sign in to comment.