focusing <input type=password> breaks selecting / copy&paste
Originator: | stefan-google | ||
Number: | rdar://45003896 | Date Originated: | October 4 2018, 12:19 PM |
Status: | Closed | Resolved: | |
Product: | iOS + SDK | Safari | Product Version: | 12.0 (16A366), multiple devices |
Classification: | Reproducible: | yes |
Summary: * Focusing an <input type=password> field breaks text selection and thus copy&paste. * It does not happen on iOS 11. It happens with iOS 12. * The STR below are one variant of this issue. * Similar scenarios exist through React with "autofocus" where React eventually calls input.focus(). Navigating away from the page with the password field (and thus the field being removed from the DOM) does *not* fix the issue. Until page reload, text selection stays broken. Workaround here is to click some field that brings up the keyboard and dismiss it, which restores copy&paste. Steps to Reproduce: 1. save attached index.html somewhere 2. serve the file so that iOS Safari can view it 3. Observe selecting text works 4. focus password field 5. observe selecting text fails 6. dismiss keyboard 7. observe selecting text works again Expected Results: I should be able to select text regardless of focus on a password field. Actual Results: Text selection is broken / appears to be racy (at least one can get the magnifier for text selection for short amounts of time). Attachment: index.html <!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> </head> <body> <p>Focus the password field, then try to copy and paste this text.</p> <input type="password"> </body> </html>
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
follow up bug: rdar://45040527 https://openradar.appspot.com/radar?id=5030841029754880
Stefan Breunig October 5 2018, 2:35 PM
I'm sorry, I only now discovered that text selection is intentionally disabled while focus is in a text field. Therefore, the STR from the ticket description are wrong. I will close this bug and create a new one to avoid any confusion.
This issue has been verified by the developer as resolved.
Apple Developer Relations
Engineering has requested a sysdiagnose from your iOS device in order to further investigate this issue.
Please reproduce the issue, trigger a sysdiagnose and attach the log file to your bug report.
Important: Note the date and time the issue occurred and include this information in your bug report.
Note: It's important to trigger the sysdiagnose process as soon as possible after the problem occurs, even if the logs can't be synced off the device until later.
iOS sysdiagnose Instructions: https://developer.apple.com/services-account/download?path=/iOS/iOS_Logs/sysdiagnose_Logging_Instructions.pdf
For issues with APNS, Continuity, FaceTime, Messages and Software Update install the logging profile below, reproduce the issue and then collect a sysdiagnose.
iOS sysdiagnose Logging Profile: https://developer.apple.com/services-account/download?path=/iOS/iOS_Logs/loggingiOS.mobileconfig
For a complete list of logging instructions visit: https://developer.apple.com/bug-reporting/profiles-and-logs/