1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Merge pull request #1723 from cehmke/fix-buttonwidget-textreference-selected

Use of getTextRefence in ButtonWidget.isSelected
This commit is contained in:
Jeremy Ruston 2015-05-12 11:20:47 +01:00
commit f0206283cf

View File

@ -107,11 +107,10 @@ ButtonWidget.prototype.allowActionPropagation = function() {
ButtonWidget.prototype.getBoundingClientRect = function() {
return this.domNodes[0].getBoundingClientRect();
}
};
ButtonWidget.prototype.isSelected = function() {
var tiddler = this.wiki.getTiddler(this.set);
return tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;
return this.wiki.getTextReference(this.set,"",this.getVariable("currentTiddler")) === this.setTo;
};
ButtonWidget.prototype.isPoppedUp = function() {