|
|
@@ -444,7 +444,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, |
|
|
|
&& nativeEvent.getKeyCode() == KeyCodes.KEY_TAB |
|
|
|
&& nativeEvent.getShiftKey()) { |
|
|
|
nativeEvent.preventDefault(); |
|
|
|
FocusUtil.focusOnLastFocusableElement(this.getElement()); |
|
|
|
FocusUtil.focusOnLastFocusableElement(getElement()); |
|
|
|
} |
|
|
|
if (nativeEvent.getEventTarget().cast() == topTabStop |
|
|
|
&& nativeEvent.getKeyCode() == KeyCodes.KEY_BACKSPACE) { |
|
|
@@ -461,7 +461,7 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, |
|
|
|
&& nativeEvent.getKeyCode() == KeyCodes.KEY_TAB |
|
|
|
&& !nativeEvent.getShiftKey()) { |
|
|
|
nativeEvent.preventDefault(); |
|
|
|
FocusUtil.focusOnFirstFocusableElement(this.getElement()); |
|
|
|
FocusUtil.focusOnFirstFocusableElement(getElement()); |
|
|
|
} |
|
|
|
if (nativeEvent.getEventTarget().cast() == bottomTabStop |
|
|
|
&& nativeEvent.getKeyCode() == KeyCodes.KEY_BACKSPACE) { |
|
|
@@ -706,12 +706,16 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, |
|
|
|
public void setVaadinModality(boolean modality) { |
|
|
|
vaadinModality = modality; |
|
|
|
if (vaadinModality) { |
|
|
|
getElement().setAttribute("aria-modal", "true"); |
|
|
|
Roles.getDialogRole().set(getElement()); |
|
|
|
if (isAttached()) { |
|
|
|
showModalityCurtain(); |
|
|
|
} |
|
|
|
addTabBlockHandlers(); |
|
|
|
deferOrdering(); |
|
|
|
} else { |
|
|
|
getElement().removeAttribute("aria-modal"); |
|
|
|
Roles.getDialogRole().remove(getElement()); |
|
|
|
if (modalityCurtain != null) { |
|
|
|
if (isAttached()) { |
|
|
|
hideModalityCurtain(); |