Skip to content

Fix bug where elements in select2 drop cannot be focused#2846

Merged
kevin-brown merged 1 commit into
select2:masterfrom
colemanw:patch-2
Jan 24, 2015
Merged

Fix bug where elements in select2 drop cannot be focused#2846
kevin-brown merged 1 commit into
select2:masterfrom
colemanw:patch-2

Conversation

@colemanw

@colemanw colemanw commented Dec 5, 2014

Copy link
Copy Markdown
Contributor

Background: CiviCRM builds on select2 by adding some extra filters and controls to the select2 drop area:

select2_drop

Tracking down why the user was being prevented from interacting with the controls, I found that this chrome workaround had the undesired side-effect of preventing anything in the select2 drop from being focused (affected single but not multi selects for some reason). Making the condition more specific to the actual problem being worked around solves this.

This chrome workaround had the undesired side-effect of preventing anything in the select2 drop from being focused (affected single but not multi selects for some reason). Making the condition more specific to the actual problem being worked around solves this.
@kevin-brown

Copy link
Copy Markdown
Member

I found that this chrome workaround had the undesired side-effect of preventing anything in the select2 drop from being focused

This is interesting, as the workaround should only affect cases where the <body> element is focused.

This fix wasn't brought over to Select2 4.0, as it appears that the scrolling issue has been fixed. Perhaps we should just remove the fix in Select2 3.5.x?

@colemanw

colemanw commented Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

Using the latest version of Chrome I was not able to reproduce the bug described in the comments after removing the workaround. So yes I would support removing it, although merging this PR for 3.5.x and leaving the woraround out of 4.x would be maybe a gentler touch.

@colemanw

colemanw commented Jan 6, 2015

Copy link
Copy Markdown
Contributor Author

Either way, it would be awesome to see this resolved in 3.5.x so that we can release the next version of CiviCRM with the official upstream code from select2.

@colemanw

Copy link
Copy Markdown
Contributor Author

Also just ran across the bug fixed by #2925
It would be awesome to see an 3.5 release that incorporates that fix as well as either of the proposed fixes for this issue.
Thanks again for all your hard work @kevin-brown

kevin-brown added a commit that referenced this pull request Jan 24, 2015
Fix bug where elements in select2 drop cannot be focused
@kevin-brown
kevin-brown merged commit 3a10bd9 into select2:master Jan 24, 2015
@colemanw

Copy link
Copy Markdown
Contributor Author

Great, thanks!

@colemanw
colemanw deleted the patch-2 branch January 24, 2015 01:18
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

Successfully merging this pull request may close these issues.

2 participants