Fix CSS and blur on commant submission
This commit is contained in:
parent
fd39a48bea
commit
7b711254a5
5 changed files with 14 additions and 7 deletions
|
|
@ -152,6 +152,7 @@ app.views.CommentStream = app.views.Base.extend({
|
|||
closeForm: function() {
|
||||
this.$("form").removeClass("open");
|
||||
this.$(".md-editor").removeClass("active");
|
||||
this.commentBox.blur();
|
||||
autosize.update(this.commentBox);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,15 @@ body {
|
|||
#publisher_textarea_wrapper { background-color: $gray; }
|
||||
.btn.btn-link.question_mark:hover .entypo-cog { color: $gray-light; }
|
||||
}
|
||||
|
||||
.write-preview-tabs > li.active * { color: $text-color; }
|
||||
.md-preview { background-color: $gray; }
|
||||
.md-cancel:hover .entypo-cross { color: $gray-light; }
|
||||
.publisher-buttonbar .btn.btn-link:hover i { color: $gray-light; }
|
||||
}
|
||||
|
||||
.write-preview-tabs > li.active * { color: $text-color; }
|
||||
.md-cancel:hover .entypo-cross { color: $gray-light; }
|
||||
|
||||
.md-input,
|
||||
.md-preview { background-color: $gray; }
|
||||
|
||||
.aspect_dropdown li a .text { color: $dropdown-link-color; }
|
||||
|
||||
.info .tag { background-color: $gray-light; }
|
||||
|
|
@ -95,6 +97,7 @@ body {
|
|||
|
||||
#welcome-to-diaspora { background: $orange; }
|
||||
|
||||
.md-editor,
|
||||
.block-form fieldset .form-control:focus { border-color: $input-border; }
|
||||
|
||||
&.page-registrations.action-new,
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@
|
|||
|
||||
|
||||
.md-preview {
|
||||
background: $white;
|
||||
color: $text-color;
|
||||
// !important is needed to override the CSS rules dynamically added to the element
|
||||
// scss-lint:disable ImportantRule
|
||||
|
|
|
|||
|
|
@ -21,10 +21,13 @@ describe("app.views.CommentStream", function(){
|
|||
});
|
||||
|
||||
it("calls onFormBlur when clicking outside the comment box", function() {
|
||||
spyOn(app.views.CommentStream.prototype, "onFormBlur");
|
||||
// remove existing event handlers
|
||||
$(document.body).off("click");
|
||||
|
||||
spyOn(this.view, "onFormBlur");
|
||||
this.view.setupBindings();
|
||||
$(document.body).click();
|
||||
expect(app.views.CommentStream.prototype.onFormBlur).toHaveBeenCalled();
|
||||
expect(this.view.onFormBlur).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ afterEach(function() {
|
|||
expect($(".modal-backdrop").length).toBe(0);
|
||||
$(".modal-backdrop").remove();
|
||||
spec.loadFixtureCount = 0;
|
||||
$(document.body).off();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue