New issue
Advanced search Search tips

Issue 732605 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Focus and blurs triggering during page load with iframes

Reported by he...@pfinders.com, Jun 13 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:53.0) Gecko/20100101 Firefox/53.0

Steps to reproduce the problem:
1. http://mail2.pfinders.com/vindicia/
2. Reload the page repeatedly and watch different input boxes get the focus  Also, notice the credit card fields sometimes get a red box around it.

What is the expected behavior?
The "first name" field should always get the focus. The credit card input boxes should never turn red on page load.

What went wrong?
The credit card fields inside small iframes are receiving focus and blur events during page load. This causes them to place a red box around the input field. Until the page loads, the focus and blur events should be blocked as the iframes are loading.
The onReady function is happening before the iframes are done loading. This prevents me from setting the focus on the input box of my choice.

Did this work before? N/A 

Chrome version: 58.0.3029.110 (Official Build) (64-bit) (cohort: 59_86_Win)  Channel: stable
OS Version: 7
Flash Version: 

The input box inside an iframe should not automatically get a focus. This style of programming is required due to PCI (credit card industry) mandate.
 

Comment 1 Deleted

Comment 2 by he...@pfinders.com, Jun 13 2017

This bad behavior is reproducible on the Mac too.
Labels: Needs-Milestone OS-Mac

Comment 4 by he...@pfinders.com, Jun 13 2017

Mac Google Chrome Version 59.0.3071.86 (Official Build) (64-bit) has this problem. I tested it on OS X El Capitan 10.11.6
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Windows 7, mac 10.12.5 & Ubuntu 14.04 using chrome stable-59.0.3071.86, reported version-58.0.3029.110  & Canary-61.0.3129.0 as per the steps mentioned in comment#1.

Please check the issue by upgrading chrome to the latest stable / Canary & let us know your observations on the same.

Please find the attached screencast for reference.
Thanks..!


732605.mp4
924 KB View Download

Comment 6 by he...@pfinders.com, Jun 20 2017

Timing problems are hard to see on fast networks. Hold down shift when clicking on reload button (or Ctrl-Shift_R).

In the attached video you can see the issue with reloads. The focus is not the same on all reloads. It changes. 

Sometimes I can make it happens every time, but sometimes it takes 20 tries before I see it. Timing problems are frustrating to work on :)
chrome_timing_issue.mp4
1.4 MB View Download
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 20 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Blink>JavaScript
Labels: -Needs-Milestone M-61 OS-Linux
Status: Untriaged (was: Unconfirmed)
Tested on Chrome Stable#59.0.3071.109, Canary#61.0.3137.0 on Windows 10 and able to reproduce the issue.
 
This is a non-regression issue and able to reproduce from M-51 #51.0.2662.0. Marking it as untriaged so that issue gets addressed.
 
Observations:
1. In Mac and Windows behavior is same, whereas in Linux - unstable version the screen is not rendered properly and in Stable version issue is reproduced.
 
Note: In the builds earlier to Chrome version #51.0.2662.0, few fields are not loaded. 
Thank You.

732605.png
295 KB View Download

Comment 9 by bokan@chromium.org, Jun 22 2017

Components: -Blink>JavaScript -Blink Blink>Focus Blink>Forms

Comment 10 by tkent@chromium.org, Jun 23 2017

Labels: -M-61 Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
Confirmed.

It seems our autofocus implementation misses the step 5 or 6 in the specification.

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofocusing-a-form-control:-the-autofocus-attribute
> 5. If target's origin is not the same as the origin of the node document of the currently focused element in target's top-level browsing context, abort these steps.

> 6. If target's origin is not the same as the origin of the active document of target's top-level browsing context, abort these steps.


I think you can workaround this bug by adding 'sandbox' attribute to the IFRAME.

Components: Blink>HTML>Focus
Components: -Blink>Focus
Fixing the autofocus problem of iframe will not fix all the problem.
After fixing this, the wikipedia iframe input element will not get focus any more.

But credit card fields seems not using autofocus attribute. It's JavaScript setting the focus. Is there any spec about "The onReady function is happening before the iframes are done loading." ?
Project Member

Comment 14 by sheriffbot@chromium.org, Jan 10

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment