Browse Source

Add solve for dimmer to prevent modal scrolling in bg

pull/6440/head
Jack 6 years ago
parent
commit
75dcaa2694
2 changed files with 17 additions and 3 deletions
  1. 10
      RELEASE-NOTES.md
  2. 10
      src/definitions/modules/dimmer.js

10
RELEASE-NOTES.md

@ -3,14 +3,18 @@
### Version 2.3.2 - June 17, 2018
**Enhancements**
- **Modal** - Modal and Dimmer now prevent background page from scrolling on mobile or where touch events are present
- **Button** - Add `inverted` and `inverted basic` variations for `primary` and `secondary` buttons **Thanks @hammy2899** [#6242](https://github.com/Semantic-Org/Semantic-UI/pull/6424)
**Theming**
- **Global** - Add `hover` `down` `active` and `focus` variables for `invertedPrimaryColor` and `invertedSecondaryColor`
- **Button** - Add `inverted` and `inverted basic` variations for `primary` and `secondary` buttons **Thanks @hammy2899** #6242
**Bugs**
- **Dropdown** Fixed bug that could cause dropdown to recursively trigger network requests specifically when using `apiSettings` with a url that returns valid response but with no results when clicking directly on the `dropdown icon`. **Thanks @vpeti** [#5231 [#5809](https://github.com/Semantic-Org/Semantic-UI/pull/6424)
- **Statistics** - Fix issue where grouped statistics would have excess bottom margin if they are `:last-child`
- **Label** - Fix `basic label` does not use `@basicBackground` variables **Thanks @levithomson**
- **Modal** - Modal will not refocus a field if field is already focused **Thanks @nikolaybobrovskiy** #6301
- **Icon** - Fix `wechat icon` not displaying due to typo **Thanks @alex-karo** #6429
- **Modal** - Modal will not refocus a field if field is already focused **Thanks @nikolaybobrovskiy** [#6301](https://github.com/Semantic-Org/Semantic-UI/pull/6424)
- **Icon** - Fix `wechat icon` not displaying due to typo **Thanks @alex-karo** [#6429](https://github.com/Semantic-Org/Semantic-UI/pull/6424)
### Version 2.3.1 - Mar 18, 2018

10
src/definitions/modules/dimmer.js

@ -114,6 +114,10 @@ $.fn.dimmer = function(parameters) {
bind: {
events: function() {
if(module.is.page()) {
// touch events default to passive, due to changes in chrome to optimize mobile perf
$dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
}
if(settings.on == 'hover') {
$dimmable
.on('mouseenter' + eventNamespace, module.show)
@ -141,6 +145,9 @@ $.fn.dimmer = function(parameters) {
unbind: {
events: function() {
if(module.is.page()) {
$dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
}
$module
.removeData(moduleNamespace)
;
@ -157,6 +164,9 @@ $.fn.dimmer = function(parameters) {
module.hide();
event.stopImmediatePropagation();
}
},
preventScroll: function(event) {
event.preventDefault();
}
},

Loading…
Cancel
Save