Bug 161311 - Relative URLs not resolved in the correct iframe when calling click() cross-frame
Summary: Relative URLs not resolved in the correct iframe when calling click() cross-f...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 08:36 PDT by zenojevski
Modified: 2016-08-29 16:39 PDT (History)
3 users (show)

See Also:


Attachments
Test case (2.76 KB, application/zip)
2016-08-29 08:36 PDT, zenojevski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description zenojevski 2016-08-29 08:36:54 PDT
Created attachment 287268 [details]
Test case

Version 10.0 (12602.1.50.0.2)
iOS and macOS

When programmatically triggering a click event on a button which is inside an iframe,
relative URLS are not resolved according to that frame, but to the frame from where the event
was sent.

Included is a testcase which demonstrates the bug. Open the top.html frame, and try to
click the outside button (which clicks the inside button) and the inside button.

Look at the console to see the issue:

> Failed to load resource: the server responded with a status of 404 (File not found) - http://localhost:8080/Testcase/other.html

Instead it should resolve the URL as:

> http://localhost:8080/Testcase/sub/other.html

Which is relative to the frame containing the button.

URLs should be resolved relative to the frame where the clicked element resides.