1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 20:10:03 +00:00

Fix undefined tabindex problem with link widget

The tabindex attribute was being set to the string “undefined” if the
attribute was not specified. The fix is to only set the tabindex
attribute if the attribute was specified.
This commit is contained in:
Jermolene 2015-03-25 11:11:07 +00:00
parent 0ea1dad2c8
commit 4eb2e3d3b4

View File

@ -86,7 +86,9 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
if(tag === "a") {
domNode.setAttribute("href",wikiLinkText);
}
if(this.tabIndex) {
domNode.setAttribute("tabindex",this.tabIndex);
}
// Set the tooltip
// HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to "<$transclude field='tooltip'><$transclude field='title'/></$transclude>"
var tooltipWikiText = this.tooltip || this.getVariable("tv-wikilink-tooltip");