Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stencil applies href to <a> immediately rather than on click.

Firefox (recently?) does not pick up changes to href in the click event.
  • Loading branch information...
commit e4527f2d72db6ec1f07aaeb758514879025ffa62 1 parent ae383f6
@joseph joseph authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/controls/stencil.js
View
6 src/controls/stencil.js
@@ -172,6 +172,11 @@ Monocle.Controls.Stencil = function (reader) {
function fixLink(link, hrefObject, handler) {
link.setAttribute('target', '_blank');
link.deconstructedHref = hrefObject;
+ if (hrefObject.external) {
+ link.href = hrefObject.external;
+ } else if (link.relatedLink) {
+ link.removeAttribute('href');
+ }
if (link.stencilClickHandler) { return; }
link.stencilClickHandler = handler;
Monocle.Events.listen(link, 'click', link.stencilClickHandler);
@@ -312,7 +317,6 @@ Monocle.Controls.Stencil = function (reader) {
return;
}
if (href.external) {
- link.href = href.external;
return;
}
var cmptId = href.componentId + href.hash;
Please sign in to comment.
Something went wrong with that request. Please try again.