diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 2225a88ce..1edd19521 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -172,11 +172,12 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) { // Place a tiddler in edit mode NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) { + var self = this; function isUnmodifiedShadow(title) { // jshint eqnull:true - var tiddler = $tw.wiki.getTiddler(title); + var tiddler = self.wiki.getTiddler(title); return ( - $tw.wiki.isShadowTiddler(title) && + self.wiki.isShadowTiddler(title) && tiddler.fields.modified == null ); } diff --git a/plugins/tiddlywiki/codemirror/codemirroreditor.js b/plugins/tiddlywiki/codemirror/codemirroreditor.js index 2643dc8cc..c898d1ebc 100644 --- a/plugins/tiddlywiki/codemirror/codemirroreditor.js +++ b/plugins/tiddlywiki/codemirror/codemirroreditor.js @@ -59,7 +59,7 @@ EditTextWidget.prototype.postRender = function() { lineWrapping: true, lineNumbers: true }, - tid = $tw.wiki.getTiddler(this.editTitle); + tid = this.wiki.getTiddler(this.editTitle); if(tid && tid.fields.type) { cm_opts.mode = tid.fields.type };