diff --git a/modules/webapp/src/main/elm/Comp/ItemCardList.elm b/modules/webapp/src/main/elm/Comp/ItemCardList.elm index ab607af6..47d2c345 100644 --- a/modules/webapp/src/main/elm/Comp/ItemCardList.elm +++ b/modules/webapp/src/main/elm/Comp/ItemCardList.elm @@ -76,21 +76,10 @@ update _ msg model = else let - firstNew = - Data.Items.first list - - scrollCmd = - case firstNew of - Just item -> - Ports.scrollToElem item.id - - Nothing -> - Cmd.none - newModel = { model | results = Data.Items.concat model.results list } in - ( newModel, scrollCmd, Nothing ) + ( newModel, Cmd.none, Nothing ) SelectItem item -> ( model, Cmd.none, Just item ) diff --git a/modules/webapp/src/main/webjar/docspell.js b/modules/webapp/src/main/webjar/docspell.js index 229eecbb..6c1dacc5 100644 --- a/modules/webapp/src/main/webjar/docspell.js +++ b/modules/webapp/src/main/webjar/docspell.js @@ -32,20 +32,20 @@ elmApp.ports.setAllProgress.subscribe(function(input) { }, 100); }); -elmApp.ports.scrollToElem.subscribe(function(id) { - if (id && id != "") { - window.setTimeout(function() { - var el = document.getElementById(id); - if (el) { - if (el["scrollIntoViewIfNeeded"]) { - el.scrollIntoViewIfNeeded(); - } else { - el.scrollIntoView(); - } - } - }, 20); - } -}); +// elmApp.ports.scrollToElem.subscribe(function(id) { +// if (id && id != "") { +// window.setTimeout(function() { +// var el = document.getElementById(id); +// if (el) { +// if (el["scrollIntoViewIfNeeded"]) { +// el.scrollIntoViewIfNeeded(); +// } else { +// el.scrollIntoView(); +// } +// } +// }, 20); +// } +// }); elmApp.ports.saveUiSettings.subscribe(function(args) { if (Array.isArray(args) && args.length == 2) {