Skip to content

Commit

Permalink
Fixes tabbing-mode remains active after closing modal #9790 (#10074)
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen authored Mar 30, 2021
1 parent 499e4f0 commit c881fa9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
var defaultFocusedElement = getAutoFocusElement(focusableElements);
var firstFocusableElement = focusableElements[0];
var lastFocusableElement = focusableElements[focusableElements.length -1];

// We need to add the tabbing-active class in order to highlight the focused button since the default style is
// outline: none; set in the stylesheet specifically
bodyElement.classList.add('tabbing-active');

// If there is no default focused element put focus on the first focusable element in the nodelist
if(defaultFocusedElement === null ){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
right: 0;
border-radius: 3px;
box-shadow: 0 0 2px 0px @ui-outline, inset 0 0 2px 2px @ui-outline;
pointer-events: none;
}
}

Expand Down
9 changes: 8 additions & 1 deletion src/Umbraco.Web.UI.Client/src/less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,14 @@ select[size] {
input[type="file"],
input[type="radio"],
input[type="checkbox"] {
.umb-outline();
&:focus {
border-color: @inputBorderFocus;
outline: 0;

.tabbing-active & {
outline: 2px solid @ui-outline;
}
}
}


Expand Down

0 comments on commit c881fa9

Please sign in to comment.