Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3,744 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Java
Stelle
124
Fork
269
Merge medio
1g 19h
PR unite (30g)
63

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-platform/eclipse.platform.ui

Tutte le issue di eclipse-platform/eclipse.platform.ui

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.