Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ If so, please delete it since it will prevent the federation from working proper * Fix height too high on mobile SPV [#7480](https://github.com/diaspora/diaspora/pull/7480) * Improve stream when ignoring a person who posts a lot of tagged posts [#7503](https://github.com/diaspora/diaspora/pull/7503) * Fix order of comments across pods [#7436](https://github.com/diaspora/diaspora/pull/7436) * Prevent publisher from closing in preview mode [#7518](https://github.com/diaspora/diaspora/pull/7518) ## Features * Add support for mentions in comments to the backend [#6818](https://github.com/diaspora/diaspora/pull/6818) Loading app/assets/javascripts/app/views/publisher_view.js +2 −2 Original line number Diff line number Diff line Loading @@ -407,8 +407,8 @@ app.views.Publisher = Backbone.View.extend({ }, tryClose : function(){ // if it is not submittable, close it. if( !this._submittable() ){ // if it is not submittable and not in preview mode, close it. if (!this._submittable() && !this.markdownEditor.isPreviewMode()) { this.close(); } }, Loading spec/javascripts/app/views/publisher_view_spec.js +25 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,31 @@ describe("app.views.Publisher", function() { }); }); describe("tryClose", function() { it("doesn't close the publisher if it is submittable", function() { spyOn(this.view, "_submittable").and.returnValue(true); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).not.toHaveBeenCalled(); }); it("doesn't close the publisher if it is in preview mode", function() { spyOn(this.view, "_submittable").and.returnValue(false); spyOn(this.view.markdownEditor, "isPreviewMode").and.returnValue(true); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).not.toHaveBeenCalled(); }); it("closes the publisher if it is neither submittable nor in preview mode", function() { spyOn(this.view, "_submittable").and.returnValue(false); spyOn(this.view.markdownEditor, "isPreviewMode").and.returnValue(false); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).toHaveBeenCalled(); }); }); describe("_beforeUnload", function(){ it("calls _submittable", function(){ spyOn(this.view, "_submittable"); Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ If so, please delete it since it will prevent the federation from working proper * Fix height too high on mobile SPV [#7480](https://github.com/diaspora/diaspora/pull/7480) * Improve stream when ignoring a person who posts a lot of tagged posts [#7503](https://github.com/diaspora/diaspora/pull/7503) * Fix order of comments across pods [#7436](https://github.com/diaspora/diaspora/pull/7436) * Prevent publisher from closing in preview mode [#7518](https://github.com/diaspora/diaspora/pull/7518) ## Features * Add support for mentions in comments to the backend [#6818](https://github.com/diaspora/diaspora/pull/6818) Loading
app/assets/javascripts/app/views/publisher_view.js +2 −2 Original line number Diff line number Diff line Loading @@ -407,8 +407,8 @@ app.views.Publisher = Backbone.View.extend({ }, tryClose : function(){ // if it is not submittable, close it. if( !this._submittable() ){ // if it is not submittable and not in preview mode, close it. if (!this._submittable() && !this.markdownEditor.isPreviewMode()) { this.close(); } }, Loading
spec/javascripts/app/views/publisher_view_spec.js +25 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,31 @@ describe("app.views.Publisher", function() { }); }); describe("tryClose", function() { it("doesn't close the publisher if it is submittable", function() { spyOn(this.view, "_submittable").and.returnValue(true); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).not.toHaveBeenCalled(); }); it("doesn't close the publisher if it is in preview mode", function() { spyOn(this.view, "_submittable").and.returnValue(false); spyOn(this.view.markdownEditor, "isPreviewMode").and.returnValue(true); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).not.toHaveBeenCalled(); }); it("closes the publisher if it is neither submittable nor in preview mode", function() { spyOn(this.view, "_submittable").and.returnValue(false); spyOn(this.view.markdownEditor, "isPreviewMode").and.returnValue(false); spyOn(this.view, "close"); this.view.tryClose(); expect(this.view.close).toHaveBeenCalled(); }); }); describe("_beforeUnload", function(){ it("calls _submittable", function(){ spyOn(this.view, "_submittable"); Loading