mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-18 22:36:43 +09:00
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:
1 parent
5bcb0ce0fc
commit
21cf3f774d
6 files changed
+36
-199
No files matched your search
@@ -82,14 +82,6 @@ export function queryElems<T extends HTMLElement>(parent: Element | ParentNode,
|
||||
return applyElemsCallback<T>(parent.querySelectorAll(selector), fn);
|
||||
}
|
||||
|
||||
export function onDomReady(cb: () => Promisable<void>) {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', cb);
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
|
||||
/** checks whether an element is owned by the current document, and whether it is a document fragment or element node
|
||||
* if it is, it means it is a "normal" element managed by us, which can be modified safely. */
|
||||
export function isDocumentFragmentOrElementNode(el: Node) {
|
||||
|
||||
Reference in new issue
Block a user