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

Console errors when scrolling Swagger UI with request snippets: "TypeError: Cannot read properties of undefined (reading 'preventYScrollingBeyondElement')" #7932

Closed
hkosova opened this issue Mar 23, 2022 · 0 comments · Fixed by #7941

Comments

@hkosova
Copy link
Contributor

hkosova commented Mar 23, 2022

Q&A (please complete the following information)

Content & configuration

Swagger UI must be configured with requestSnippetsEnabled = true.

For example, you can use https://petstore.swagger.io/?requestSnippetsEnabled=true

Describe the bug you're encountering

If you switch between the request snippet tabs and then scroll the page up/down, the following error is logged to the console. The error does not seem to affect any functionality though.

Uncaught TypeError: Cannot read properties of undefined (reading 'preventYScrollingBeyondElement')
    at onWheel (request-snippets.jsx:76:45)
    at Object.Ve (react-dom.production.min.js:52:317)
    at Ge (react-dom.production.min.js:52:471)
    at react-dom.production.min.js:53:35
    at Or (react-dom.production.min.js:100:68)
    at jr (react-dom.production.min.js:101:380)
    at react-dom.production.min.js:113:65
    at De (react-dom.production.min.js:292:189)
    at react-dom.production.min.js:50:57
    at Mr (react-dom.production.min.js:105:469)

To reproduce...

  1. Open https://petstore.swagger.io/?requestSnippetsEnabled=true
  2. Open the browser console.
  3. Execute POST /pet with the default request body.
  4. In the request snippets section, switch to the "cURL (PowerShell)" tab.
  5. Scroll the page up-down.
  6. In the request snippets section, switch to the "cURL (CMD)" tab.
  7. Scroll the page up-down.

At some point during steps 4-7 you'll see the console errors about preventYScrollingBeyondElement.

Expected behavior

No errors in the console.

Screenshots

image

Additional context or thoughts

n/a

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.

1 participant