mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
fix-scroll-bug (#2746)
This commit is contained in:
@@ -422,7 +422,10 @@ class DraftReview extends React.Component {
|
||||
}
|
||||
if (typeof(key) === 'string') {
|
||||
const win = window;
|
||||
const element = win.document.querySelector(`[data-key="${key}"]`);
|
||||
let element = win.document.querySelector(`[data-key="${key}"]`);
|
||||
while (element.tagName === "CODE") {
|
||||
element = element.parentNode;
|
||||
}
|
||||
const scroller = this.findScrollContainer(element, win);
|
||||
const isWindow = scroller == win.document.body || scroller == win.document.documentElement;
|
||||
if (isWindow) {
|
||||
|
Reference in New Issue
Block a user