Skip to content

Commit

Permalink
Remove auto-scrolling behavior
Browse files Browse the repository at this point in the history
This doesn’t work reliably, and even when it does, feels stranger than I
expected it would. It will also be less necessary once we hide aren’t
showing the welcome text on every page.

Issue #92: Remove auto-scrolling behavior when loading detail page
  • Loading branch information
reefdog committed Sep 17, 2024
1 parent 6629f85 commit b362dba
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions front-end/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
</template>

<script setup lang="ts">
import { ref, watch } from 'vue';
import { useRoute } from 'vue-router';
import { ref } from 'vue';
import LeafletMap from '@/components/LeafletMap.vue';
import type {
ImageTileData,
Expand All @@ -72,17 +71,6 @@ const resourcesPrefetch = ref<Array<Resource> | undefined>(undefined);
const searchListContainer = ref<HTMLDivElement | null>(null);
const route = useRoute();
watch(
() => route.params.id,
(newId) => {
if (newId && searchListContainer.value) {
searchListContainer.value.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}
);
async function prefetchResources() {
try {
const url = new URL(`${import.meta.env.VITE_ARCHES_API_URL}/archesdataviewer/prefetch/`);
Expand Down

0 comments on commit b362dba

Please sign in to comment.