-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Let's make sure issue is not already fixed in latest builds first.
- I verified latest Integration Build of Eclipse SDK doesn't provide the feature.
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.