Skip to content

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

@MWI-msg

Description

@MWI-msg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions