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

[CCI] Bug fix for eui select in firefox browser using onclick #3524

Closed

Conversation

Nicksqain
Copy link
Contributor

@Nicksqain Nicksqain commented Mar 5, 2023

Description

Use this code to bypass the error in eui select. Now select input works in firefox browser

Issues Resolved

Fixes #3134

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
manasvinibs Manasvini B Suryanarayana
@Nicksqain Nicksqain requested a review from a team as a code owner March 5, 2023 08:11
@Nicksqain Nicksqain closed this Mar 5, 2023
@Nicksqain Nicksqain reopened this Mar 5, 2023
@Nicksqain Nicksqain closed this Mar 5, 2023
@Nicksqain Nicksqain deleted the fix-firefox-euiSelect branch March 5, 2023 08:32
@Nicksqain Nicksqain restored the fix-firefox-euiSelect branch March 5, 2023 08:57
@Nicksqain Nicksqain reopened this Mar 5, 2023
@AMoo-Miki
Copy link
Collaborator

@Nicksqain Do you know what was preventing onChange from working? I ask because this could be happening in other places as well and maybe we should look for a wider solution.

@ashwin-pc ashwin-pc self-assigned this Mar 7, 2023
@Nicksqain
Copy link
Contributor Author

@AMoo-Miki I haven't quite figured out the EUI library yet, but all I've figured out is that for some reason in mozilla event.target the onChange event returns an initialised value. I'm trying to work on this issue.

@Nicksqain Nicksqain changed the title Bug fix for eui select in firefox browser using onclick [CCI] Bug fix for eui select in firefox browser using onclick Mar 8, 2023
@ashwin-pc ashwin-pc added the OSCI Open Source Contributor Initiative label Mar 9, 2023
@ashwin-pc
Copy link
Member

ashwin-pc commented Mar 10, 2023

@Nicksqain Thanks for taking a look at this. Your fix actually made me question whats actually happening here and I realized that the issue was a little more complicated that it seems on the surface. The chart option is not the issue here because other parts of the app use it without this issue on firefox. e.g the Vertical bar visualization in Visualize. Taking a closer look, it looks like the issue is because of a race condition. The EuiResizableContainer in the app causes re-renders constantly (even when the mouse simply moves over the UI). This seems to be resetting the select box value. I think that the re-render in firefox happens a little faster than it does in chrome, which is why I think its a race condition.

You change does fix the issue, but it only covers up the bigger issue here. Can you look to prevent the unnecessary rerenders on the child components caused by the EuiResizableContainer ?

@Nicksqain
Copy link
Contributor Author

@ashwin-pc
Yes, I noticed the constant rendering of components as the mouse moves.
I'll see what I can do, right after fixing the type issue.

@ashwin-pc
Copy link
Member

closing this PR since #3732 fixes the issue

@ashwin-pc ashwin-pc closed this Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSCI Open Source Contributor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Firefox - the "Legend position" selector in Vis Builder doesn't allow changes
3 participants