refactor: clean ui modal component (#39654)

1. use "button" element for the modal close button
2. remove "ui modal" width hacks
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-07 11:49:50 -07:00
1 parent 5bcb0ce0fc
commit 21cf3f774d
6 files changed
+36 -199

No files matched your search

+1 -2
View File
@@ -2,7 +2,6 @@ import {registerGlobalInitFunc} from './observer.ts';
import {createElementFromHTML, hideElem, toggleElem} from '../utils/dom.ts';
import {showFomanticModal} from './fomantic/modal.ts';
import {html} from '../utils/html.ts';
import {svgRaw} from '../svg.ts';
type ShortcutHandler = (el: HTMLElement) => boolean;
@@ -76,7 +75,7 @@ function showShortcutHelp() {
<div id="global-shortcut-help" class="ui small modal" role="dialog" aria-modal="true">
<div class="header">
Keyboard Shortcuts
${svgRaw('octicon-x', 16, 'close-modal')}
<button type="button" class="close-modal"></button>
</div>
<div class="scrolling content">
<table class="ui very basic compact unstackable table">