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

[graphiql] Info popups lose position on page scroll #3202

Closed
1 of 4 tasks
lesleydreyer opened this issue May 31, 2023 · 1 comment · Fixed by #3203
Closed
1 of 4 tasks

[graphiql] Info popups lose position on page scroll #3202

lesleydreyer opened this issue May 31, 2023 · 1 comment · Fixed by #3203

Comments

@lesleydreyer
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If not using the editor as full page (have other divs above or below and scroll enabled by turning off the body css overflow: hidden), the info popups will lose their place on the page when you scroll. I think it's coming from codemirror-graphql > src > utils > info-addon > onMouseOver > info on line 104. I wasn't sure if there's a way to try re-calculating the info if it's not found based on where the editor has scrolled to.

initial position person tooltip works scolled position person tooltip broke
initial position works scrolled position broke

Expected Behavior

Should be able to see the hover tooltips

Steps To Reproduce

1. Temporarily adjust grapiql > src > components > Graphiql.tsx to 
    <div>
       <div style={{height: '200px'}}/>
       ...GraphiQLProvider element that's there
       <div style={{height: '200px'}}/>
    </div>
2. graphiql > resources > index.html.ejs temporarily comment out the body css "overflow: hidden"

Module pattern

  • graphiql-umd
  • graphiql-esm
  • graphiql-commonjs

Environment

- GraphiQL Version:
- OS:
- Browser:
- Bundler:
- `react` Version:
- `graphql` Version:

Anything else?

No response

@dimaMachina
Copy link
Collaborator

@lesleydreyer released in graphiql@3.0.0-alpha.0

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

Successfully merging a pull request may close this issue.

2 participants