Skip to content

Commit

Permalink
Merge pull request #75 from withastro/main
Browse files Browse the repository at this point in the history
Updates ---r8
  • Loading branch information
akshit20421 authored Nov 24, 2023
2 parents e42f52c + ae29fad commit aeba37e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-socks-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a view transition issue on webKit browsers that prevented scrolling to #fragments
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

We welcome contributions of any size and skill level. As an open source project, we believe in giving back to our contributors and are happy to help with guidance on PRs, technical writing, and turning any feature idea into a reality.

> **Tip for new contributors:**
> Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
> [!Tip] > **For new contributors:** Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
## Quick Guide

Expand Down Expand Up @@ -46,7 +45,8 @@ To get started, create a codespace for this repository by clicking this 👇

Your new codespace will open in a web-based version of Visual Studio Code. All development dependencies will be preinstalled, and the tests will run automatically ensuring you've got a green base from which to start working.

**Note**: Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
> [!Note]
> Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
### Development

Expand Down Expand Up @@ -187,7 +187,7 @@ Understanding in which environment code runs, and at which stage in the process,

Active Astro development happens on the [`main`](https://github.com/withastro/astro/tree/main) branch. `main` always reflects the latest code.

> **Note:**
> [!Note]
> During certain periods, we put `main` into a [**prerelease**](https://github.com/changesets/changesets/blob/main/docs/prereleases.md#prereleases) state. Read more about [Releasing Astro](#releasing-astro).
### `latest`
Expand All @@ -198,7 +198,8 @@ By default, `create-astro` and [astro.new](https://astro.new) point to this bran

## Releasing Astro

_Note: Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro._
> [!Note]
> Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro.
The repo is set up with automatic releases, using the changeset GitHub action & bot.

Expand Down
3 changes: 2 additions & 1 deletion packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ const moveToLocation = (to: URL, from: URL, options: Options, historyState?: Sta
to.href
);
}
history.scrollRestoration = 'manual';
}
// now we are on the new page for non-history navigations!
// (with history navigation page change happens before popstate is fired)
Expand All @@ -213,12 +212,14 @@ const moveToLocation = (to: URL, from: URL, options: Options, historyState?: Sta
// because we are already on the target page ...
// ... what comes next is a intra-page navigation
// that won't reload the page but instead scroll to the fragment
history.scrollRestoration = 'auto';
location.href = to.href;
} else {
if (!scrolledToTop) {
scrollTo({ left: 0, top: 0, behavior: 'instant' });
}
}
history.scrollRestoration = 'manual';
}
};

Expand Down

0 comments on commit aeba37e

Please sign in to comment.