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

JS error on try.gitea.io Error: Syntax error, unrecognized expression: input[type='range' #22702

Closed
wxiaoguang opened this issue Feb 1, 2023 · 8 comments · Fixed by #22710
Closed
Labels

Comments

@wxiaoguang
Copy link
Contributor

Description

https://try.gitea.io/wxiaoguang/test/pulls/6/files

image

Gitea Version

dev

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

try

Database

None

@wxiaoguang wxiaoguang changed the title JS error on try.gitea.io JS error on try.gitea.io Error: Syntax error, unrecognized expression: input[type='range' Feb 1, 2023
@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2023

Can't reproduce this myself right now.

@wxiaoguang
Copy link
Contributor Author

But, the JS code is wrong .... since 2021-02-28

The ] is missing.

image

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2023

Weird that my browser isn't barfing on it.

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2023

const $range = $container.find("input[type='range'");

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2023

PR up.

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2023

Thanks @wxiaoguang

@lunny
Copy link
Member

lunny commented Feb 1, 2023

Js lint cannot detected that problem.

@wxiaoguang
Copy link
Contributor Author

Weird that my browser isn't barfing on it.

Maybe new Firefox is more strict. I don't see this error on my Chrome either.

lunny pushed a commit that referenced this issue Feb 1, 2023
There was a missing `]` in imagediff.js:

```
const $range = $container.find("input[type='range'"); 
```

This PR simply adds this.

Fix #22702
yardenshoham pushed a commit to yardenshoham/gitea that referenced this issue Feb 1, 2023
There was a missing `]` in imagediff.js:

```
const $range = $container.find("input[type='range'"); 
```

This PR simply adds this.

Fix go-gitea#22702
zeripath added a commit that referenced this issue Feb 1, 2023
Backport #22710

There was a missing `]` in imagediff.js:

```
const $range = $container.find("input[type='range'"); 
```

This PR simply adds this.

Fix #22702

Co-authored-by: zeripath <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants