Skip to content

Commit

Permalink
fix(modal): touch scrolling (dropdown, content, focussed input) fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de authored and Sean committed Dec 3, 2018
1 parent 2b2fd30 commit f7c0229
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/definitions/modules/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ $.fn.modal = function(parameters) {
});
},
preventScroll: function(event) {
event.preventDefault();
if(event.target.className.indexOf('dimmer') !== -1) {
event.preventDefault();
}
},
deny: function() {
if(ignoreRepeatedEvents || settings.onDeny.call(element, $(this)) === false) {
Expand Down Expand Up @@ -386,7 +388,7 @@ $.fn.modal = function(parameters) {
else {
if( settings.allowMultiple ) {
if ( module.others.active() ) {
$otherModals.filter('.' + className.active).find(selector.dimmer).addClass('active')
$otherModals.filter('.' + className.active).find(selector.dimmer).addClass('active');
}

if ( settings.detachable ) {
Expand Down Expand Up @@ -461,15 +463,16 @@ $.fn.modal = function(parameters) {
}
},
onComplete : function() {
module.unbind.scrollLock();
if ( settings.allowMultiple ) {
$previousModal.addClass(className.top);
$module.removeClass(className.top);

if ( hideOthersToo ) {
$allModals.find(selector.dimmer).removeClass('active')
$allModals.find(selector.dimmer).removeClass('active');
}
else {
$previousModal.find(selector.dimmer).removeClass('active')
$previousModal.find(selector.dimmer).removeClass('active');
}
}
settings.onHidden.call(element);
Expand Down Expand Up @@ -790,7 +793,7 @@ $.fn.modal = function(parameters) {
},
active: function() {
$module.addClass(className.active + ' ' + className.top);
$otherModals.filter('.' + className.active).removeClass(className.top)
$otherModals.filter('.' + className.active).removeClass(className.top);
},
scrolling: function() {
$dimmable.addClass(className.scrolling);
Expand Down

0 comments on commit f7c0229

Please # to comment.