forked from forgejo/forgejo
Make "cancel" buttons have proper type in modal forms (#25618)
Replace #25446, fix #25438 All "cancel" buttons which do not have "type" should not submit the form, should not be triggered by "Enter". This is a complete fix for all modal dialogs. The major change is "modules/aria/modal.js", "devtest" related code is for demo/test purpose.
This commit is contained in:
parent
2aa6a785cf
commit
45bc180a15
4 changed files with 52 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import $ from 'jquery';
|
||||
import {initAriaCheckboxPatch} from './aria/checkbox.js';
|
||||
import {initAriaDropdownPatch} from './aria/dropdown.js';
|
||||
import {initAriaModalPatch} from './aria/modal.js';
|
||||
import {svg} from '../svg.js';
|
||||
|
||||
export const fomanticMobileScreen = window.matchMedia('only screen and (max-width: 767.98px)');
|
||||
|
@ -26,6 +27,7 @@ export function initGiteaFomantic() {
|
|||
// Use the patches to improve accessibility, these patches are designed to be as independent as possible, make it easy to modify or remove in the future.
|
||||
initAriaCheckboxPatch();
|
||||
initAriaDropdownPatch();
|
||||
initAriaModalPatch();
|
||||
}
|
||||
|
||||
function initFomanticApiPatch() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue