Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vertically attached dropdown #3542

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,33 @@ select.ui.dropdown {
}


/*-------------------
Attached
--------------------*/

/* Singular */
.ui.attached.dropdown {
display: block;
width: ~"calc(100% + 2px)";
left: -1px;
border-radius: 0em;
}

/* Top / Bottom */
.ui.attached.top.dropdown {
margin-bottom: -1px;
z-index: 1;
border-radius: @borderRadius @borderRadius 0em 0em;
}
.ui.attached.bottom.dropdown {
margin-top: -1px;
border-radius: 0em 0em @borderRadius @borderRadius;
}
.ui.attached.dropdown + .ui.attached.segment:not(.top) {
border-top: 1px solid @borderColor;
}


/*--------------
Floating
---------------*/
Expand Down
8 changes: 4 additions & 4 deletions src/definitions/modules/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ $.fn.modal = function(parameters) {
escapeKey = 27
;
if(keyCode == escapeKey) {
if(settings.closable) {
if(settings.closable && settings.closable !== 'click') {
module.debug('Escape key pressed hiding modal');
module.hide();
}
else {
module.debug('Escape key pressed, but closable is set to false');
module.debug('Escape key pressed, but closable is set to ' + settings.closable);
}
event.preventDefault();
}
Expand Down Expand Up @@ -494,7 +494,7 @@ $.fn.modal = function(parameters) {
$module.removeClass(className.active);
},
clickaway: function() {
if(settings.closable) {
if(settings.closable && settings.closable !== 'escapeKey') {
$dimmer
.off('click' + elementNamespace)
;
Expand Down Expand Up @@ -579,7 +579,7 @@ $.fn.modal = function(parameters) {
}
},
clickaway: function() {
if(settings.closable) {
if(settings.closable && settings.closable !== 'escapeKey') {
$dimmer
.on('click' + elementNamespace, module.event.click)
;
Expand Down