You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Rewrite `dirauto.ts` to `observer.ts`.
* We have been using MutationObserver for long time, it's proven that it
is quite performant.
* Now we extend its ability to handle more "init" works.
2. Use `observeAddedElement` to init all non-custom "dropdown".
3. Use `data-global-click` to handle click events from dynamically
loaded elements.
* By this new approach, the old fragile selector-based
(`.comment-reaction-button`) mechanism is removed.
4. By the way, remove unused `.diff-box` selector, it was abused and
never really used.
A lot of FIXMEs in "repo-diff.ts" are completely fixed, newly loaded
contents could work as expected.
// Special popup-directions, prevent Fomantic from guessing the popup direction.
64
-
// With default "direction: auto", if the viewport height is small, Fomantic would show the popup upward,
65
-
// if the dropdown is at the beginning of the page, then the top part would be clipped by the window view.
66
-
// eg: Issue List "Sort" dropdown
67
-
// But we can not set "direction: downward" for all dropdowns, because there is a bug in dropdown menu positioning when calculating the "left" position,
68
-
// which would make some dropdown popups slightly shift out of the right viewport edge in some cases.
// Special popup-directions, prevent Fomantic from guessing the popup direction.
68
+
// With default "direction: auto", if the viewport height is small, Fomantic would show the popup upward,
69
+
// if the dropdown is at the beginning of the page, then the top part would be clipped by the window view.
70
+
// eg: Issue List "Sort" dropdown
71
+
// But we can not set "direction: downward" for all dropdowns, because there is a bug in dropdown menu positioning when calculating the "left" position,
72
+
// which would make some dropdown popups slightly shift out of the right viewport edge in some cases.
0 commit comments