Skip to content

navigation to pages with iframes with relative URLs are broken after #4070 #4177

@rgossiaux

Description

@rgossiaux

Describe the bug

  • You have a page at "/foo/bar" which loads an iframe whose source is the relative URL "baz" (the absolute URL is thus "/foo/baz")
  • You navigate from "/foo" to "/foo/bar"
  • The iframe loads with the wrong relative URL--it should load with the relative URL of the page it's on (so "/foo/baz") but instead it loads relative to the original page ("/baz")
  • Refresh and everything works; the error is only on navigation.

This is a regression. I bisected the kit version responsible for this and it's 1.0.0-next.285 which looks to correspond to this PR: #4070

Reproduction

You can repro on this branch: rgossiaux/svelte-headlessui#74

  • Clone the repo
  • npm install
  • git checkout upgrade-kit
  • npm run dev
  • Go to the /docs home page
  • Click on Dialog on the sidebar

The iframe will 404. After a refresh it will load.

Logs

No response

System Info

System:
    OS: macOS 12.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 5.59 GB / 64.00 GB
    Shell: 3.3.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.8.0 - /var/folders/rn/2kdgb0jj25q2v656j3qc_ywr0000gn/T/fnm_multishells/2969_1644654672256/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 7.21.0 - /var/folders/rn/2kdgb0jj25q2v656j3qc_ywr0000gn/T/fnm_multishells/2969_1644654672256/bin/npm
  Browsers:
    Chrome: 98.0.4758.109
    Safari: 15.2
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.4
    @sveltejs/kit: ^1.0.0-next.285 => 1.0.0-next.285
    svelte: ^3.44.0 => 3.44.3

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions