SWT DateTime (GTK) traps TAB traversal inside widget causing infinite internal focus cycling (day/month/year), no TRAVERSE_TAB_NEXT emitted
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- java
- Lĩnh vực
- desktop-dev
Hướng nghiên cứu
Start in org.eclipse.swt.widgets.DateTime and the GTK-specific backend code that handles key and traverse events. The bug is that TAB is consumed internally instead of being propagated as SWT.TRAVERSE_TAB_NEXT. Look for the event filter or key handling in the GTK DateTime implementation. Verify by running the SWT automated tests for DateTime and focus traversal.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When using org.eclipse.swt.widgets.DateTime on GTK (Linux), the widget consumes TAB key events internally instead of propagating them as SWT traversal events.
As a result, focus never leaves the control and TAB navigation loops between internal fields (day → month → year).
This behavior does not occur on Windows.
Environment
-
- All OS
-
- Windows
-
- Linux
-
- macOS
SWT: 3.133.0 (Eclipse 4.39)
Java: OpenJDK 25.0.3
OS: Ubuntu 26.04
Desktop: MATE
Windowing system: X11
GTK: 3.24.52
Locale: es_ES.UTF-8
(and tests in Ubuntu 26.04 Gnome and swt 3.134.0)
Steps To Reproduce
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
public class DateTimeTabDebug {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout(2, false));
new Label(shell, SWT.NONE).setText("Text 1:");
Text t1 = new Text(shell, SWT.BORDER);
t1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
new Label(shell, SWT.NONE).setText("Date:");
DateTime dt = new DateTime(shell, SWT.DATE | SWT.DROP_DOWN | SWT.BORDER);
dt.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
new Label(shell, SWT.NONE).setText("Text 2:");
Text t2 = new Text(shell, SWT.BORDER);
t2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
javac --release 25 \
-cp org.eclipse.swt.gtk.linux.x86_64-3.133.0.jar \
DateTimeTabDebug.java
java \
-cp .:org.eclipse.swt.gtk.linux.x86_64-3.133.0.jar \
DateTimeTabDebug
Actual Behavior
When pressing TAB:
Focus moves from Text1 → DateTime correctly
Inside DateTime:
- TAB cycles through internal fields (day → month → year)
- Focus never leaves the widget
- No focusLost event is generated
- No TRAVERSE_TAB_NEXT is received
Debug output shows repeated:
[FILTER TRAVERSE] widget=DateTime detail=0 doit=true
[DATE TRAVERSE] detail=0 doit=true
(detail=0 corresponds to SWT.TRAVERSE_NONE)
The event is repeated indefinitely.
Expected behavior
Pressing TAB inside DateTime should:
- Move focus to next control (Text2)
- Generate SWT.TRAVERSE_TAB_NEXT
- Trigger focusLost on DateTime
Same behavior as on Window
A clear and concise description of what you expected to happen.
Observed Impact
- Keyboard navigation is broken on GTK
- Focus becomes trapped inside DateTime
- Cross-platform inconsistency (Windows vs Linux)
- No reliable workaround using standard SWT listeners
Additional Notes
- TraverseListener is triggered but only with SWT.TRAVERSE_NONE (detail=0)
- KeyListener does not reliably receive TAB before GTK consumes it
- Issue reproducible in minimal SWT application
- Likely related to GTK DateTime internal editing of sub-fields
Request
Please confirm whether this is:
- a known limitation of SWT GTK DateTime, or
- a regression in SWT GTK event translation layer
and whether there is a recommended workaround or fix planned.
- Ngôn ngữ chính
- Java
- Star
- 202
- Fork
- 206
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 109
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-platform/eclipse.platform.swt
-
[Win32] Table tooltip indexes cell font with subitem -1Có thể đã có người làm @fdesbiens đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-platform/eclipse.platform.swt#3752 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Cocoa] NPE in Text.shouldChangeTextInRange_replacementString when the press-and-hold accent menu inserts textCó thể đã có người làm @Jm6CnDDXBwFTakS đã nhận 1 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
eclipse-platform/eclipse.platform.swt#3819 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-platform/eclipse.platform.swt
Issue tương tự
-
API `/api/dataverses/{identifier}/dataset/linkingDataverses?alreadyLinking=true` returns at most 1 collectionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởType: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
javaoperatorsdk.client.oauth-token has no effect on the Kubernetes clientCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
MCP add-on: JSON responses with non-ASCII characters are truncated (wrong Content-Length)Có thể đã có người làm @dhanushbs10 đã nhận hôm nay. Đang mởadd-on bug in:mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Map.Coordinate does not implement proper equalsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởvaadin-map
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vaadin/flow-components#10586 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
WeReadInstaller writes the launcher database on the main thread at handover (Activity pause timeout)Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100