Open
Bug 1425988
Opened 7 years ago
Updated 2 years ago
Resubmitting form with target attribute shifts focus to target tab
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
NEW
People
(Reporter: alexhaan, Unassigned)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
274 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0.1 Waterfox/56.0.1
Build ID: 20171213145345
Steps to reproduce:
- Open attached file
- Click first button; result: action is opened in new tab/window
- Switch back to first form
- Click either button again (second uses Javascript submit, just to be more complete)
Actual results:
Result in Firefox 57 1: Focus is switched to the second tab/window
Expected results:
Just like in up to Firefox 53 (possibly also 54, I forgot to bring my notes, will try to update tomorrow): Focus remains in the first tab/window, updating the target in the background. This is also how other browsers act.
I combed through the release notes of the version that first acted differently and didn't read any mention about this.
In our situation we can simply use PostMessage to update the target. But this is quite a change though it might seem small.
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: Untriaged → HTML: Form Submission
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
Regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4f4ae3322be2d7c5f9bdda5e0985151b26edea3c&tochange=3405c39b18ac86975a2cb278a7d1e18784cc4712
d47b335bd9a5 Samael Wang — Bug 1303838 - Switch to existing target tab when clicking links. r=smaug
Oh, you're quick!
Reading that bug, that change totally makes sense. That's of course for links with the target attribute and this is about a form being submitted. Thinking about it from that point of view it totally makes sense to switch focus. Except that Chrome/ium and IE (11) then do not switch focus.
Updated•7 years ago
|
Flags: needinfo?(sawang)
Priority: -- → P2
Comment 3•7 years ago
|
||
Humm... it seems Safari & Chrome change focus on link click and window.open, but not form submission.
I'm a bit reserved for changing the behavior, tho. Firefox doesn't highlight the tab on iframe navigation or hash change, so if there's another form targeting on an iframe of the new tab, submission on the 2nd form feels like nothing happened.
Flags: needinfo?(sawang)
Comment 4•7 years ago
|
||
We've discovered this behaviour in our application too.
Submitting to an existing target forces the focues in the the tab: the same action in Chrome/IE doesn't do that.
Any chance to have a fix in a future release ?
Assignee | ||
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•