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

When selecting a license you can't write in any field #15172

Closed
tomaswarynyca opened this issue Mar 26, 2021 · 10 comments · Fixed by #15193 or #16576
Closed

When selecting a license you can't write in any field #15172

tomaswarynyca opened this issue Mar 26, 2021 · 10 comments · Fixed by #15193 or #16576
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@tomaswarynyca
Copy link
Contributor

When you try to create a repository and select a license you cannot continue working in the other fields.
I checked the bug in try.gitea.io v1.15.0+dev-27-gdc56fb7c8

@noerw
Copy link
Member

noerw commented Mar 26, 2021

Can't reproduce in latest firefox. Which browser are you using? Did you try clearing the browser cache? Are there errors in JS concole?

@tomaswarynyca
Copy link
Contributor Author

tomaswarynyca commented Mar 26, 2021

Curious it happens to me in Edge, Chrome and Opera, I just installed Opera to test it
The console does not throw any error.

@noerw
Copy link
Member

noerw commented Mar 26, 2021

Indeed, looks like only FF is unaffected.
1.14.0-rc2 is not affected, dfb3e50 is affected.

@noerw noerw added type/bug topic/ui Change the appearance of the Gitea UI labels Mar 26, 2021
@noerw noerw added this to the 1.15.0 milestone Mar 26, 2021
@noerw
Copy link
Member

noerw commented Mar 26, 2021

1a03fa7 is the bad commit.
@silverwind any idea what's causing this? Any text selection stops working after opening that dropdown

@silverwind
Copy link
Member

silverwind commented Mar 29, 2021

Hmm I think the only related upgrade there is jQuery which did some changes with focus events which may trigger this bug in Fomantic's form handling. Should try if reverting jQuery to 3.5.1 fixes this, and if so, report issue to Fomantic.

https://blog.jquery.com/2021/03/02/jquery-3-6-0-released/

If it isn't the jQuery update, maybe some other frontend dependency is interfering since the upgrade.

@tomaswarynyca
Copy link
Contributor Author

Dependabot made a PR to upgrade to jquery v3.6 but they haven't approved it yet
It is set for v2.9 of fomantic, currently they are on v2.8.7.

We should go back to jquery v3.5.1 and the problem should be fixed.

@silverwind
Copy link
Member

Also one needs to consider our hard-fork version of semantic's dropdown module which could also be the source of the error. I guess it's time to finally drop it if it's indicated as the source of the error.

@silverwind
Copy link
Member

So it seems both downgrading jQuery and removing the hard-fork seem to resolve the issue. I'll go with the latter as it also removes 150kB frontend and it's something I've been meaning to do for a while now. It does mean dropdowns will be slightly less accessible but I think such changes are better done upstream anyways.

silverwind added a commit to silverwind/gitea that referenced this issue Mar 29, 2021
jQuery 3.6.0 seems to have broke the dropdown focus handling (focus
would get stuck on the dropdown) in this module which we have vendored
on top of fomantic for accessibility improvements.

Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to
resolve the issue and I opted for removing the copy because I think such
changes should be done upstream and the removal also lightens the JS by
155kB before minify/gzip.

Fixes: go-gitea#15172
6543 pushed a commit that referenced this issue Mar 30, 2021
jQuery 3.6.0 seems to have broke the dropdown focus handling (focus
would get stuck on the dropdown) in this module which we have vendored
on top of fomantic for accessibility improvements.

Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to
resolve the issue and I opted for removing the copy because I think such
changes should be done upstream and the removal also lightens the JS by
155kB before minify/gzip.

Fixes: #15172

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
@lubber-de
Copy link

lubber-de commented Apr 25, 2021

I tried with a simple form containing a dropdown using jquery 3.6.0 and latest fomantic 2.8.8-beta
I cannot reproduce what you are describing. Changing one of the dropdowns does still allow for the other form fields to be selected/filled/used.

Could you please adjust my jsfiddle (if possible) to be able to reproduce the situation in gitea? I am otherwise about to merge the jquery 3.6.0 dependency into fomantic
https://jsfiddle.net/lubber/gs9mLey0/4/

@silverwind
Copy link
Member

silverwind commented Apr 25, 2021

I think there is indeed no issue with jQuery 3.6.0 with the latest fomantic dropdown.js version, the bug we were seeing showed only with that older dropdown.js version we had loaded in combination with jQuery 3.6.0.

@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
zeripath added a commit to zeripath/gitea that referenced this issue Jul 29, 2021
This PR restores the vendored and patched dropdow from go-gitea#8638. It
however, abandons the calls to `click()` using instead the default
dropdown click calls instead. This prevents the issue of the dropdown
grabbing focus permanently however, this may have negative effects on
the effect of focus on the dropdowns.

Of note, the behaviour of the template selector dropdown on the repo
creation page is slightly odd - I don't believe that this odd behaviour
is caused by this PR but rather by the feed source for this. I suspect
that the dropdown should be adding a delete button to its selection.

Fix go-gitea#15172
References: go-gitea#7057

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Aug 4, 2021
…tea#16576)

Backport go-gitea#16576

This PR restores the vendored and patched dropdow from go-gitea#8638. It
however, it partially abandons the call to `click()` using instead the
default dropdown click calls instead. This prevents the issue of the
dropdown grabbing focus permanently however, this may have negative
effects on the effect of focus on the dropdowns.

Of note, the behaviour of the template selector dropdown on the repo
creation page is slightly odd - I don't believe that this odd behaviour
is caused by this PR but rather by the feed source for this. I suspect
that the dropdown should be adding a delete button to its selection.

Fix go-gitea#15172
References: go-gitea#7057

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this issue Aug 4, 2021
Backport #16576

This PR restores the vendored and patched dropdow from #8638. It
however, it partially abandons the call to `click()` using instead the
default dropdown click calls instead. This prevents the issue of the
dropdown grabbing focus permanently however, this may have negative
effects on the effect of focus on the dropdowns.

Of note, the behaviour of the template selector dropdown on the repo
creation page is slightly odd - I don't believe that this odd behaviour
is caused by this PR but rather by the feed source for this. I suspect
that the dropdown should be adding a delete button to its selection.

Fix #15172
References: #7057

Signed-off-by: Andrew Thornton <[email protected]>
lafriks pushed a commit that referenced this issue Aug 5, 2021
* Restore #10096/#8638 and re-fix #15172

This PR restores the vendored and patched dropdow from #8638. It
however, abandons the calls to `click()` using instead the default
dropdown click calls instead. This prevents the issue of the dropdown
grabbing focus permanently however, this may have negative effects on
the effect of focus on the dropdowns.

Of note, the behaviour of the template selector dropdown on the repo
creation page is slightly odd - I don't believe that this odd behaviour
is caused by this PR but rather by the feed source for this. I suspect
that the dropdown should be adding a delete button to its selection.

Fix #15172
References: #7057

Signed-off-by: Andrew Thornton <[email protected]>

* leverage fomantic-build instead

Signed-off-by: Andrew Thornton <[email protected]>

* as per jookia

Signed-off-by: Andrew Thornton <[email protected]>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
jQuery 3.6.0 seems to have broke the dropdown focus handling (focus
would get stuck on the dropdown) in this module which we have vendored
on top of fomantic for accessibility improvements.

Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to
resolve the issue and I opted for removing the copy because I think such
changes should be done upstream and the removal also lightens the JS by
155kB before minify/gzip.

Fixes: go-gitea#15172

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
4 participants