mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-05-22 01:04:07 +00:00
Merge pull request #2166 from matabele/patch-5
Fix inadvertent clearing of text field (default) when `field` attribu…
This commit is contained in:
commit
83c54f4bb5
@ -61,11 +61,13 @@ SetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|||||||
var self = this,
|
var self = this,
|
||||||
options = {};
|
options = {};
|
||||||
options.suppressTimestamp = !this.actionTimestamp;
|
options.suppressTimestamp = !this.actionTimestamp;
|
||||||
if((typeof this.actionField == "string") || (typeof this.actionIndex == "string") || (typeof this.actionValue == "string")) {
|
if (this.actionField) {
|
||||||
this.wiki.setText(this.actionTiddler, this.actionField, this.actionIndex, this.actionValue, options);
|
this.wiki.setText(this.actionTiddler, this.actionField, this.actionIndex, this.actionValue, options);
|
||||||
}
|
}
|
||||||
$tw.utils.each(this.attributes, function (attribute, name) {
|
$tw.utils.each(this.attributes, function (attribute, name) {
|
||||||
if (name.charAt(0) !== "$") {
|
if (name.charAt(0) !== "$") {
|
||||||
|
(name.search("!!") !== -1 || name.search("##") !== -1) ?
|
||||||
|
self.wiki.setTextReference(name, attribute, self.actionTiddler):
|
||||||
self.wiki.setText(self.actionTiddler, name, undefined, attribute, options);
|
self.wiki.setText(self.actionTiddler, name, undefined, attribute, options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user