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 error on scroll: Unable to preventDefault inside passive event listener due to target being treated as passive #7497

Closed
kristina-kovacikova-acn opened this issue Sep 14, 2021 · 6 comments · Fixed by #7519

Comments

@kristina-kovacikova-acn

OS: [windows, mac]
Browser: [chrome, edge]
Swagger-Editor version: 3.52.2
Swagger/OpenAPI version: [OpenAPI 3.0.3]

Description of the issue

When scrolling "Example value" = inside class .highlight-code the following error is thrown in the browser's console
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/6662647093133312

Steps to reproduce

swagger.txt

  1. Copy past OpenAPI definition from the file above into https://editor.swagger.io/
  2. collapse /pet endpoint
  3. open console in the dev tools
  4. scroll inside body -> example value -> error will be shown in the console
@char0n char0n self-assigned this Sep 15, 2021
@char0n
Copy link
Member

char0n commented Sep 15, 2021

Hi @kristina-kovacikova-acn,

Thanks for reporting this. Would you be willing to entertain investigating this issue and providing a fix for it via PR?

@kristina-kovacikova-acn
Copy link
Author

kristina-kovacikova-acn commented Sep 17, 2021

Hi @char0n,

sure. I can investigate the issue and provide PR.

@char0n
Copy link
Member

char0n commented Sep 17, 2021

@kristina-kovacikova-acn great!

kristina-kovacikova added a commit to kristina-kovacikova/swagger-ui that referenced this issue Sep 21, 2021
kristina-kovacikova added a commit to kristina-kovacikova/swagger-ui that referenced this issue Sep 23, 2021
char0n pushed a commit that referenced this issue Oct 5, 2021
…7497) (#7519)

Co-authored-by: Mahtis Michel <mathis.michel@outlook.de>

Refs #7497
@char0n
Copy link
Member

char0n commented Oct 12, 2021

There was a regression, we'll dealing with it in #7554

@char0n char0n reopened this Oct 12, 2021
char0n added a commit that referenced this issue Oct 12, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
char0n added a commit that referenced this issue Oct 12, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
char0n added a commit that referenced this issue Oct 12, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
char0n added a commit that referenced this issue Oct 12, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
@char0n
Copy link
Member

char0n commented Oct 12, 2021

Tests are not passing after ported in React 17 using it's new APIs. Working on it here: #7379

@char0n
Copy link
Member

char0n commented Oct 14, 2021

Fixed on release/4.x branch.

@char0n char0n closed this as completed Oct 14, 2021
char0n added a commit that referenced this issue Oct 22, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
char0n added a commit that referenced this issue Nov 2, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
char0n added a commit that referenced this issue Nov 3, 2021
SyntaxHighlighter component doesn't support ref. We had
to use different approach to finds it's DOM Node using
ref of the root Node of the render tree for HighlightCode
component.

Refs #7497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment