mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-20 16:29:43 +01:00
JBR-3504 a11y focus is set on the wrong element when opening popups
(cherry-picked from commita69e12e0d2) (cherry picked from commite06081f5ab)
This commit is contained in:
committed by
Vitaly Provodin
parent
0ced987104
commit
26e644e5d4
@@ -416,7 +416,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
|||||||
|
|
||||||
protected int getInitialStyleBits() {
|
protected int getInitialStyleBits() {
|
||||||
// defaults style bits
|
// defaults style bits
|
||||||
int styleBits = DECORATED | HAS_SHADOW | CLOSEABLE | MINIMIZABLE | ZOOMABLE | RESIZABLE | TITLE_VISIBLE;
|
int styleBits = DECORATED | HAS_SHADOW | CLOSEABLE | ZOOMABLE | RESIZABLE | TITLE_VISIBLE;
|
||||||
|
|
||||||
if (isNativelyFocusableWindow()) {
|
if (isNativelyFocusableWindow()) {
|
||||||
styleBits = SET(styleBits, SHOULD_BECOME_KEY, true);
|
styleBits = SET(styleBits, SHOULD_BECOME_KEY, true);
|
||||||
@@ -426,8 +426,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
|||||||
final boolean isFrame = (target instanceof Frame);
|
final boolean isFrame = (target instanceof Frame);
|
||||||
final boolean isDialog = (target instanceof Dialog);
|
final boolean isDialog = (target instanceof Dialog);
|
||||||
final boolean isPopup = (target.getType() == Window.Type.POPUP);
|
final boolean isPopup = (target.getType() == Window.Type.POPUP);
|
||||||
if (isDialog) {
|
if (isFrame) {
|
||||||
styleBits = SET(styleBits, MINIMIZABLE, false);
|
styleBits = SET(styleBits, MINIMIZABLE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Either java.awt.Frame or java.awt.Dialog can be undecorated, however java.awt.Window always is undecorated.
|
// Either java.awt.Frame or java.awt.Dialog can be undecorated, however java.awt.Window always is undecorated.
|
||||||
|
|||||||
Reference in New Issue
Block a user