Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PartServiceImpl.activate(..) leads to scrolling within scrolledComposites even if triggered through a mouse click

Đang mở
#3,744 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
desktop

Hướng nghiên cứu

Start by tracing the reported focus chain from PartServiceImpl.activate(..) through PropertySheet.setFocus(), FormToolkit$VisibilityHandler.focusGained(FocusEvent), and FormUtil.ensureVisible(Control) to ScrolledComposite.setOrigin(int, int). The issue does not name files or tests, so locate those entry points and check how focus events are handled. Done means a click in the property page does not trigger disruptive scrolling, while visibility scrolling still works when needed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Let's make sure issue is not already fixed in latest builds first.

Suggestion

We implemented a customized property page using the eclipse IPropertySheetPage approach. Within this property page is a scrolled composite containing usual form widgets (laben, text etc.). Those are created with the org.eclipse.ui.forms.widgets.FormToolkit which leads to that fact, that they got attached the VisibilityHandler which is triggered by "setFocus()" from any of these widgets. That method also calls "FormUtil.ensureVisible((Control) w)" which leads to scrolling by the scrolledComposite to ensure the focused item is within the visible area. But if the setFocus is triggered by a mouse click, the attempt to scroll makes no sense, then the control must be already visible, otherwise it cant be clicked. So the setFocus method should somehow provide the information, what event caused the setFocus(). That would make it possible to react to such behavior.

Our concrete Problem is, that the first click within our property page leads to:

PartServiceImpl.activate(..)->
PartRenderingEngine.focusGui(MUIElement) ->
PropertySheet(PageBookView).setFocus() ->
TabbedPropertyComposite(Composite).setFocus() ->
ScrolledComposite(Composite).setFocus() ->
.. multiple composite levels later: ->
Twistie(Control).setFocus() ->
FormToolkit$VisibilityHandler.focusGained(FocusEvent) ->
FormUtil.ensureVisible(Control) ->
ScrolledComposite.setOrigin(int, int)

So the first click into that property page leads to scrolling which leads to an empty click, which does not hit its target.

One way or the other, there should be a way to react to such situations by using the scrolling only in situations where it is necessary and does not disturb the user experience.

Community

  • I understand suggesting an enhancement doesn't mandate anyone to implement it. Other contributors may consider this suggestion, or not, at their own convenience. The most efficient way to get it fixed is that I implement it myself and contribute it back as a good quality patch to the project.
Ngôn ngữ chính
Java
Star
124
Fork
269
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
70

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.ui

Tất cả issue của eclipse-platform/eclipse.platform.ui

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.