mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 07:29:22 +08:00
FIX: clicking the 'edit permission' button would close the category modal
This commit is contained in:
parent
c093187d34
commit
357c43e941
|
@ -4,10 +4,14 @@ export default Ember.View.extend({
|
|||
classNameBindings: [':modal', ':hidden', 'controller.modalClass'],
|
||||
|
||||
click: function(e) {
|
||||
// Delegate click to modal backdrop if clicked outside. We do this
|
||||
// because some CSS of ours seems to cover the backdrop and makes it
|
||||
// unclickable.
|
||||
if ($(e.target).closest('.modal-inner-container').length === 0) {
|
||||
var $target = $(e.target);
|
||||
// some buttons get removed from the DOM when you click on them.
|
||||
// we don't want to close the modal when we click on those...
|
||||
if ($target.parent().length > 0 &&
|
||||
$target.closest('.modal-inner-container').length === 0) {
|
||||
// Delegate click to modal backdrop if clicked outside. We do this
|
||||
// because some CSS of ours seems to cover the backdrop and makes it
|
||||
// unclickable.
|
||||
$('.modal-backdrop').click();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user