Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listbox and tree will select wrong node after mouse scroll end #1044

Open
wellcomez opened this issue Oct 25, 2024 · 2 comments
Open

listbox and tree will select wrong node after mouse scroll end #1044

wellcomez opened this issue Oct 25, 2024 · 2 comments

Comments

@wellcomez
Copy link

wellcomez commented Oct 25, 2024

remove adjust offset on mouse click #1043

  • list.go , i have fixed
    no need to adjust offset after mouse click . because at this point, offset should be right. no need adjust

  • treeview.go

  • it has more complex state management which need you pay more effort to fix it

  • root cause

    1. after mouse-leftdown, state changes to no movement.
    2. because state is not moving, treeview::process will change offsetY to make old selection node to be visible.
    3. As a result, tree and offsetY will change back to old place.
    4. when leftclick event, old value is used to get wrong node.
    5. User will find click to wrong node
@wellcomez wellcomez changed the title listbox and tree has wrong behave of click after mouse scroll listbox and tree has wrong behavior of click after mouse scroll Oct 25, 2024
@wellcomez wellcomez changed the title listbox and tree has wrong behavior of click after mouse scroll listbox and tree has wrong behavior of click after mouse scroll end Oct 25, 2024
@wellcomez wellcomez changed the title listbox and tree has wrong behavior of click after mouse scroll end listbox and tree has select wrong item after mouse scroll end Oct 25, 2024
@wellcomez wellcomez changed the title listbox and tree has select wrong item after mouse scroll end listbox and tree will select wrong node after mouse scroll end Oct 25, 2024
@rivo
Copy link
Owner

rivo commented Nov 2, 2024

I'd like to ask you to provide a brief piece of code that reproduces the issue you're facing, along with a meaningful description, instead of a — and I'm sorry to say that — badly documented pull request and issue that simply tells me "what I should do".

I don't even understand what the problem is.

@wellcomez
Copy link
Author

I'd like to ask you to provide a brief piece of code that reproduces the issue you're facing, along with a meaningful description, instead of a — and I'm sorry to say that — badly documented pull request and issue that simply tells me "what I should do".

I don't even understand what the problem is.

  • There are 9 items in view and view height is 3
  • current Item is 0
  1. scroll view with mouse wheel
  2. after scrollend, click on item 8 in listview
  3. Expect result is current item 8 and 8 be highlighted
  4. Current issue, after click, current item changed but to 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants