1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-25 19:17:19 +00:00

Scrollable: write bound value if title of bound tiddler changes

Thanks @yaisog
This commit is contained in:
Jeremy Ruston 2023-11-29 14:36:58 +00:00
parent c282208668
commit 6b47cbed32

View File

@ -183,7 +183,7 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
"scroll-left": self.outerDomNode.scrollLeft.toString(),
"scroll-top": self.outerDomNode.scrollTop.toString()
};
if(!existingTiddler || (existingTiddler.fields["scroll-left"] !== newTiddlerFields["scroll-left"] || existingTiddler.fields["scroll-top"] !== newTiddlerFields["scroll-top"])) {
if(!existingTiddler || (existingTiddler.fields["title"] !== newTiddlerFields["title"]) || (existingTiddler.fields["scroll-left"] !== newTiddlerFields["scroll-left"] || existingTiddler.fields["scroll-top"] !== newTiddlerFields["scroll-top"])) {
self.wiki.addTiddler(new $tw.Tiddler(existingTiddler,newTiddlerFields));
}
});