UX: Remove `hidden` from the `#discourse-modal` when the modal is shown

This commit is contained in:
Robin Ward 2017-07-27 17:14:41 -04:00
parent 1b1fd64639
commit c3b7419a08
4 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
elementId: 'discourse-modal',
classNameBindings: [':modal', ':hidden', 'modalClass'],
classNameBindings: [':modal', 'modalClass'],
attributeBindings: ['data-keyboard'],
// We handle ESC ourselves
@ -17,6 +17,7 @@ export default Ember.Component.extend({
});
this.appEvents.on('modal:body-shown', data => {
this.$().removeClass('hidden');
if (data.title) {
this.set('title', I18n.t(data.title));
} else if (data.rawTitle) {

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
$('#discourse-modal').modal('hide');
$('#discourse-modal').modal('hide').addClass('hidden');
}
});

View File

@ -1,4 +1,4 @@
{{#d-modal modalClass=modalClass title=title}}
{{#d-modal modalClass=modalClass title=title class="hidden"}}
<div class="modal-outer-container">
<div class="modal-middle-container">
<div class="modal-inner-container">

View File

@ -126,7 +126,7 @@
}
&.hidden {
&.hidden {
display: none;
}