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

Scroll left when I click on a selectized item and page is scrolled right #1818

Closed
5 tasks done
Bonten156 opened this issue Jun 13, 2022 · 2 comments
Closed
5 tasks done

Comments

@Bonten156
Copy link

I did:

  • Search for if my issue has already been submitted
  • Make sure I'm reporting something precise that needs to be fixed
  • Give my issue a descriptive and concise title
  • Create a minimal working example on JsFiddle or Codepen
    (or gave a link to a demo on the Selectize docs)
  • Indicate precise steps to reproduce in numbers and the result,
    like below

When I click on an option and if the page is scrolled right, there is a scroll left.
With remove_button plugin, if I click on the cross, there is a scroll too and item is not removed.

Steps to reproduce:

  1. go to https://selectize.dev/plugins/2020/01/01/remove-button-copy/
  2. Add margin to example div like below and scroll to the right :

image

  1. Try to remove one item

Expected result: Item is removed

Actual result: page scroll left and item is not removed

@Bonten156
Copy link
Author

If I remove the line self.$control_input[0].focus(); in Selectize.focus(), It seems to work well.

risadams added a commit that referenced this issue Sep 15, 2022
Fix #1818 Scroll left when I click on a selectized item and page is scrolled right
@Bonten156
Copy link
Author

After having updated, the problem seems to be not fully fixed.

Doing the same as described, the first click on a remove button will jump to the left. After as there is focus on a tag, clicking on the remove button will work and not jump.

If I don't click on the cross but on the item, it jump left too.

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

No branches or pull requests

2 participants