Skip to content

Commit 2df5004

Browse files
Updated component to version 2.5.0
1 parent 579e8b9 commit 2df5004

8 files changed

+38
-61
lines changed

RELEASE-NOTES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Version 2.5.0 - Oct 6, 2022
2+
3+
- **Modal** - Fixed mutation observer was not properly disconnected
4+
15
### Version 2.4.1 - Oct 13, 2018
26

37
- **Modal** - Fixed `fullscreen modal` having incorrect left offset with flex modals [#6587](https://github.com/Semantic-Org/Semantic-UI/issues/6587)

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"authors": [{
66
"name": "Jack Lukic",
77
"email": "[email protected]",
8-
"web": "http://www.jacklukic.com",
8+
"homepage": "http://www.jacklukic.com",
99
"role": "Creator"
1010
}],
1111
"keywords": ["semantic", "ui", "css", "framework"],
1212
"license": "MIT",
13-
"version": "2.4.1"
13+
"version": "2.5.0"
1414
}

index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* # Semantic UI 2.4.1 - Modal
2+
* # Semantic UI 2.5.0 - Modal
33
* http://github.com/semantic-org/semantic-ui/
44
*
55
*
@@ -139,6 +139,9 @@ module.exports = function(parameters) {
139139
},
140140

141141
destroy: function() {
142+
if (observer) {
143+
observer.disconnect();
144+
}
142145
module.verbose('Destroying previous modal');
143146
$module
144147
.removeData(moduleNamespace)

modal.css

+20-53
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* # Semantic UI 2.4.0 - Modal
2+
* # Semantic UI 2.5.0 - Modal
33
* http://github.com/semantic-org/semantic-ui/
44
*
55
*
@@ -20,13 +20,9 @@
2020
text-align: left;
2121
background: #FFFFFF;
2222
border: none;
23-
-webkit-box-shadow: 1px 3px 3px 0px rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
24-
box-shadow: 1px 3px 3px 0px rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
25-
-webkit-transform-origin: 50% 25%;
26-
transform-origin: 50% 25%;
27-
-webkit-box-flex: 0;
28-
-ms-flex: 0 0 auto;
29-
flex: 0 0 auto;
23+
box-shadow: 1px 3px 3px 0px rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
24+
transform-origin: 50% 25%;
25+
flex: 0 0 auto;
3026
border-radius: 0.28571429rem;
3127
-webkit-user-select: text;
3228
-moz-user-select: text;
@@ -81,8 +77,7 @@
8177
background: #FFFFFF;
8278
margin: 0em;
8379
padding: 1.25rem 1.5rem;
84-
-webkit-box-shadow: none;
85-
box-shadow: none;
80+
box-shadow: none;
8681
color: rgba(0, 0, 0, 0.85);
8782
border-bottom: 1px solid rgba(34, 36, 38, 0.15);
8883
}
@@ -105,53 +100,37 @@
105100
background: #FFFFFF;
106101
}
107102
.ui.modal > .image.content {
108-
display: -webkit-box;
109-
display: -ms-flexbox;
110103
display: flex;
111-
-webkit-box-orient: horizontal;
112-
-webkit-box-direction: normal;
113-
-ms-flex-direction: row;
114-
flex-direction: row;
104+
flex-direction: row;
115105
}
116106

117107
/* Image */
118108
.ui.modal > .content > .image {
119109
display: block;
120-
-webkit-box-flex: 0;
121-
-ms-flex: 0 1 auto;
122-
flex: 0 1 auto;
110+
flex: 0 1 auto;
123111
width: '';
124-
-ms-flex-item-align: top;
125-
align-self: top;
112+
align-self: top;
126113
}
127114
.ui.modal > [class*="top aligned"] {
128-
-ms-flex-item-align: top;
129-
align-self: top;
115+
align-self: top;
130116
}
131117
.ui.modal > [class*="middle aligned"] {
132-
-ms-flex-item-align: middle;
133-
align-self: middle;
118+
align-self: middle;
134119
}
135120
.ui.modal > [class*="stretched"] {
136-
-ms-flex-item-align: stretch;
137-
align-self: stretch;
121+
align-self: stretch;
138122
}
139123

140124
/* Description */
141125
.ui.modal > .content > .description {
142126
display: block;
143-
-webkit-box-flex: 1;
144-
-ms-flex: 1 0 auto;
145-
flex: 1 0 auto;
127+
flex: 1 0 auto;
146128
min-width: 0px;
147-
-ms-flex-item-align: top;
148-
align-self: top;
129+
align-self: top;
149130
}
150131
.ui.modal > .content > .icon + .description,
151132
.ui.modal > .content > .image + .description {
152-
-webkit-box-flex: 0;
153-
-ms-flex: 0 1 auto;
154-
flex: 0 1 auto;
133+
flex: 0 1 auto;
155134
min-width: '';
156135
width: auto;
157136
padding-left: 2em;
@@ -244,10 +223,7 @@
244223
}
245224
/*rtl:ignore*/
246225
.ui.modal .image.content {
247-
-webkit-box-orient: vertical;
248-
-webkit-box-direction: normal;
249-
-ms-flex-direction: column;
250-
flex-direction: column;
226+
flex-direction: column;
251227
}
252228
.ui.modal .content > .image {
253229
display: block;
@@ -266,8 +242,7 @@
266242
width: 100% !important;
267243
margin: 0em !important;
268244
padding: 1rem 0rem !important;
269-
-webkit-box-shadow: none;
270-
box-shadow: none;
245+
box-shadow: none;
271246
}
272247

273248
/* Let Buttons Stack */
@@ -285,8 +260,7 @@
285260
---------------*/
286261

287262
.ui.inverted.dimmer > .ui.modal {
288-
-webkit-box-shadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);
289-
box-shadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);
263+
box-shadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);
290264
}
291265

292266

@@ -298,8 +272,7 @@
298272
background-color: transparent;
299273
border: none;
300274
border-radius: 0em;
301-
-webkit-box-shadow: none !important;
302-
box-shadow: none !important;
275+
box-shadow: none !important;
303276
color: #FFFFFF;
304277
}
305278
.ui.basic.modal > .header,
@@ -396,9 +369,7 @@
396369
overflow: hidden;
397370
}
398371
.scrolling.dimmable > .dimmer {
399-
-webkit-box-pack: start;
400-
-ms-flex-pack: start;
401-
justify-content: flex-start;
372+
justify-content: flex-start;
402373
}
403374
.scrolling.dimmable.dimmed > .dimmer {
404375
overflow: auto;
@@ -427,7 +398,7 @@
427398

428399
/* Scrolling Content */
429400
.ui.modal .scrolling.content {
430-
max-height: calc(70vh);
401+
max-height: calc(80vh - 10em);
431402
overflow: auto;
432403
}
433404

@@ -437,12 +408,8 @@
437408

438409
.ui.fullscreen.modal {
439410
width: 95% !important;
440-
left: 0em !important;
441411
margin: 1em auto;
442412
}
443-
.ui.fullscreen.scrolling.modal {
444-
left: 0em !important;
445-
}
446413
.ui.fullscreen.modal > .header {
447414
padding-right: 2.25rem;
448415
}

modal.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* # Semantic UI 2.4.1 - Modal
2+
* # Semantic UI 2.5.0 - Modal
33
* http://github.com/semantic-org/semantic-ui/
44
*
55
*
@@ -138,6 +138,9 @@ $.fn.modal = function(parameters) {
138138
},
139139

140140
destroy: function() {
141+
if (observer) {
142+
observer.disconnect();
143+
}
141144
module.verbose('Destroying previous modal');
142145
$module
143146
.removeData(moduleNamespace)

0 commit comments

Comments
 (0)