mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-04 09:50:08 +00:00
aio-interface: improve headers (#7690)
Signed-off-by: Zoey <zoey@z0ey.de> Signed-off-by: Simon L. <szaimen@e.mail.de> Signed-off-by: Pablo Zmdl <pablo@nextcloud.com> Co-authored-by: Simon L. <szaimen@e.mail.de> Co-authored-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
9
php/public/scroll-into-view.js
Normal file
9
php/public/scroll-into-view.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const observer = new MutationObserver((records) => {
|
||||
const node = records[0]?.addedNodes[0];
|
||||
// Text nodes also appear here but can't be scrolled to, so we have to check for the
|
||||
// function being present.
|
||||
if (node && typeof(node.scrollIntoView) === 'function') {
|
||||
node.scrollIntoView();
|
||||
}
|
||||
});
|
||||
observer.observe(document, {childList: true, subtree: true});
|
||||
Reference in New Issue
Block a user