FIX: Clicking on gear icon should hide popup menu.
This commit is contained in:
parent
6e385f11b3
commit
4b557842eb
|
@ -366,7 +366,10 @@ export default Ember.Component.extend({
|
|||
this._resetUpload(true);
|
||||
},
|
||||
|
||||
showOptions(toolbarEvent) {
|
||||
toggleOptions(toolbarEvent) {
|
||||
if (this.get('optionsVisible')) {
|
||||
this.sendAction('hideOptions');
|
||||
} else {
|
||||
// long term we want some smart positioning algorithm in popup-menu
|
||||
// the problem is that positioning in a fixed panel is a nightmare
|
||||
// cause offsetParent can end up returning a fixed element and then
|
||||
|
@ -397,6 +400,7 @@ export default Ember.Component.extend({
|
|||
|
||||
this.sendAction('showOptions', toolbarEvent,
|
||||
{ position: "absolute", left, top });
|
||||
}
|
||||
},
|
||||
|
||||
showUploadModal(toolbarEvent) {
|
||||
|
@ -432,7 +436,7 @@ export default Ember.Component.extend({
|
|||
group: 'extras',
|
||||
icon: 'gear',
|
||||
title: 'composer.options',
|
||||
sendAction: 'showOptions'
|
||||
sendAction: 'toggleOptions'
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
markdownOptions=markdownOptions
|
||||
extraButtons="extraButtons"
|
||||
importQuote="importQuote"
|
||||
showOptions="showOptions"
|
||||
toggleOptions="toggleOptions"
|
||||
showUploadModal="showUploadModal"
|
||||
togglePreview="togglePreview"
|
||||
validation=validation
|
||||
|
|
|
@ -90,6 +90,8 @@
|
|||
groupsMentioned="groupsMentioned"
|
||||
importQuote="importQuote"
|
||||
showOptions="showOptions"
|
||||
hideOptions="hideOptions"
|
||||
optionsVisible=optionsVisible
|
||||
showToolbar=showToolbar
|
||||
showUploadSelector="showUploadSelector"
|
||||
afterRefresh="afterRefresh"}}
|
||||
|
|
Loading…
Reference in New Issue