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

Some changes for "buttons" #2

Conversation

wxiaoguang
Copy link

@wxiaoguang wxiaoguang commented Mar 13, 2023

See the commit log, I did my best to group the changes.

Major:

  • Demo for possible solution 2&3 (feel free to choose one)
    • Solution 2: $(document).on('click', 'form .ui.cancel.button'
    • Solution 3: querySelectorAll('form .ui.cancel.button')
    • I think we should use accurate selectors to avoid side effect: we only need to process the buttons inside a form.
    • Solution 2 seems better, because there are dynamically created forms, eg: Edit Issue Content.
  • Revert buttons in dropdowns
    • The "buttons" in dropdowns are for display-only, and they shouldn't be focused, otherwise it breaks the dropdown's focusing behavior.
    • So I changed them back to the old code, to prevent breaking. IMO they won't be a problem because they don't really need to be focused or handle events.
  • Rename deny button to cancel button, they are the same in Fomantic Modal: deny: '.actions .negative, .actions .deny, .actions .cancel'

Feel free to take what you like and discard the unnecessary changes.

@wxiaoguang wxiaoguang changed the title Some changes Some changes for "buttons" Mar 13, 2023
@wxiaoguang wxiaoguang force-pushed the feature/convert-divs-to-button branch from 65e6365 to 9d0efd0 Compare March 13, 2023 19:33
delvh added a commit that referenced this pull request Mar 13, 2023
Additionally, prevent the default event propagation for all buttons with
JS, convert `event` to `e` in `web_src/js/features/common-global.js` for consistency
and add fontawesome-save svg.

Closes #2

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
@delvh
Copy link
Owner

delvh commented Mar 13, 2023

Implemented by 89a26fc.
Using a git apply was the fastest way I found to implement and change everything.

@delvh delvh closed this Mar 13, 2023
@wxiaoguang wxiaoguang deleted the feature/convert-divs-to-button branch March 13, 2023 20:29
delvh pushed a commit that referenced this pull request May 23, 2024
Result of `go get -u golang.org/x/net; make tidy`.

This is related to the following vulncheck warning:
```
There are 2 vulnerabilities in modules that you require that are
neither imported nor called. You may not need to take any action.
See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck for details.

Vulnerability #1: GO-2024-2687
    HTTP/2 CONTINUATION flood in net/http
  More info: https://pkg.go.dev/vuln/GO-2024-2687
  Module: golang.org/x/net
    Found in: golang.org/x/net@v0.22.0
    Fixed in: golang.org/x/net@v0.23.0

Vulnerability #2: GO-2022-0470
    No access control in github.com/blevesearch/bleve and bleve/v2
  More info: https://pkg.go.dev/vuln/GO-2022-0470
  Module: github.com/blevesearch/bleve/v2
    Found in: github.com/blevesearch/bleve/v2@v2.3.10
    Fixed in: N/A
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants