mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 09:17:30 +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'],
|
classNameBindings: [':modal', ':hidden', 'controller.modalClass'],
|
||||||
|
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
// Delegate click to modal backdrop if clicked outside. We do this
|
var $target = $(e.target);
|
||||||
// because some CSS of ours seems to cover the backdrop and makes it
|
// some buttons get removed from the DOM when you click on them.
|
||||||
// unclickable.
|
// we don't want to close the modal when we click on those...
|
||||||
if ($(e.target).closest('.modal-inner-container').length === 0) {
|
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();
|
$('.modal-backdrop').click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user