Browse Source

#6520 - remove blurring on dimmer hide. Remove console logs.

gulp4
Jack 6 years ago
parent
commit
8a1ad49be1
2 changed files with 15 additions and 5 deletions
  1. 3
      RELEASE-NOTES.md
  2. 17
      src/definitions/modules/modal.js

3
RELEASE-NOTES.md

@ -13,11 +13,12 @@
For example when `attachable: false` is used with a modal, or if IE11/Edge is used (Absolutely positioned elements inside flex containers in IE behave differently) For example when `attachable: false` is used with a modal, or if IE11/Edge is used (Absolutely positioned elements inside flex containers in IE behave differently)
**Critical Bugs** **Critical Bugs**
- **Modal** - Fixed issue where `scrolling modal` would not allow for scrolling with touch devices (including mobile). #6449
- **Modal** - Fixed issue where `scrolling modal` would not allow for scrolling with touch devices. #6449
**Bugs** **Bugs**
- **Dropdown** - Fixed issue where `onChange` when used with `action: hide` would be missing the third param `$item` #6555 - **Dropdown** - Fixed issue where `onChange` when used with `action: hide` would be missing the third param `$item` #6555
- **Dimmer** - Dimmer now sets `variation` at runtime, to support run-time swapping between `top aligned` and `middle aligned` using `.dimmer('setting', 'variation', 'top aligned')` - **Dimmer** - Dimmer now sets `variation` at runtime, to support run-time swapping between `top aligned` and `middle aligned` using `.dimmer('setting', 'variation', 'top aligned')`
- **Modal** - Modal now will remove `blurring` after undimming, to prevent issues with position: fixed #6520
- **Menu/Dropdown** - Fixes dropdown item margin not obeyed inside `labeled icon menu` #6557 - **Menu/Dropdown** - Fixes dropdown item margin not obeyed inside `labeled icon menu` #6557
- **Modal** - Fixes `@mobileTopAlignedMargin` theming variable was not implemented - **Modal** - Fixes `@mobileTopAlignedMargin` theming variable was not implemented
- **List** - Fixed issue where `content` would not take up 100% width when used alongside `img` or `icon` - **List** - Fixed issue where `content` would not take up 100% width when used alongside `img` or `icon`

17
src/definitions/modules/modal.js

@ -319,6 +319,8 @@ $.fn.modal = function(parameters) {
; ;
module.refreshModals(); module.refreshModals();
module.set.dimmerSettings(); module.set.dimmerSettings();
module.set.dimmerStyles();
module.showModal(callback); module.showModal(callback);
}, },
@ -327,7 +329,6 @@ $.fn.modal = function(parameters) {
? callback ? callback
: function(){} : function(){}
; ;
module.unbind.scrollLock();
module.refreshModals(); module.refreshModals();
module.hideModal(callback); module.hideModal(callback);
}, },
@ -425,6 +426,7 @@ $.fn.modal = function(parameters) {
}, },
onComplete : function() { onComplete : function() {
settings.onHidden.call(element); settings.onHidden.call(element);
module.remove.dimmerStyles();
module.restore.focus(); module.restore.focus();
callback(); callback();
} }
@ -449,6 +451,7 @@ $.fn.modal = function(parameters) {
hideDimmer: function() { hideDimmer: function() {
if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) { if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
module.unbind.scrollLock();
$dimmable.dimmer('hide', function() { $dimmable.dimmer('hide', function() {
module.remove.clickaway(); module.remove.clickaway();
module.remove.screenHeight(); module.remove.screenHeight();
@ -544,6 +547,10 @@ $.fn.modal = function(parameters) {
.off('click' + elementEventNamespace) .off('click' + elementEventNamespace)
; ;
}, },
dimmerStyles: function() {
$dimmer.removeClass(className.inverted);
$dimmable.removeClass(className.blurring);
},
bodyStyle: function() { bodyStyle: function() {
if($body.attr('style') === '') { if($body.attr('style') === '') {
module.verbose('Removing style attribute'); module.verbose('Removing style attribute');
@ -685,6 +692,11 @@ $.fn.modal = function(parameters) {
? dimmerSettings.variation + ' inverted' ? dimmerSettings.variation + ' inverted'
: 'inverted' : 'inverted'
; ;
}
$context.dimmer('setting', dimmerSettings);
},
dimmerStyles: function() {
if(settings.inverted) {
$dimmer.addClass(className.inverted); $dimmer.addClass(className.inverted);
} }
else { else {
@ -696,14 +708,12 @@ $.fn.modal = function(parameters) {
else { else {
$dimmable.removeClass(className.blurring); $dimmable.removeClass(className.blurring);
} }
$context.dimmer('setting', dimmerSettings);
}, },
modalOffset: function() { modalOffset: function() {
var var
width = module.cache.width, width = module.cache.width,
height = module.cache.height height = module.cache.height
; ;
console.log(module.can.fit());
$module $module
.css({ .css({
marginTop: (settings.centered && module.can.fit()) marginTop: (settings.centered && module.can.fit())
@ -737,7 +747,6 @@ $.fn.modal = function(parameters) {
$module.addClass(className.legacy); $module.addClass(className.legacy);
}, },
type: function() { type: function() {
console.log('setting');
if(module.can.fit()) { if(module.can.fit()) {
module.verbose('Modal fits on screen'); module.verbose('Modal fits on screen');
if(!module.others.active() && !module.others.animating()) { if(!module.others.active() && !module.others.animating()) {

Loading…
Cancel
Save