You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2022-11-29] [Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then usingCMD+C to copy it does not work reported by @parasharrajat #12554
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
the selected text should be copied and pasted in the composer.
Actual Result :
Select part of the old message, right click my mouse, our context menu shows rather than the browser's menu, click Copy to Clipboard, and paste into input area, the whole message been pasted, not the selection text.
Select part of the old message, press Cmd+C to copy selection, and press Cmd+V or the browser's menu to paste into input area, nothing been pasted.
Workaround:
unknown
Platform:
Where is this issue occurring?
Web
Version Number: 1.2.24-4 Reproducible in staging?: y Reproducible in production?: y Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:
changed the title [-]Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+]on Nov 8, 2022
// Blur the input after a key is pressed to keep the blue focus border from appearing
event.target.blur();
}}
looks very problematic to me. It could have many unknown side-effects. This issue is just one of them.
Based on the real issue, looks like we want to disable the blue border on Shift+click or say it Shift only. So What about we restrict this keyDown handler to these combinations? It is important that this blue border is shown when the user uses Shift+Tab or Tab` for navigation.
Looks like something related to react-navigation may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.
@parasharrajat actually if we remove fix with .blur(), it triggers focus on every keyPress (not only Shift key). Check it on video, on Safari all symbol keys, on Chrome literally every key (except functional keys like Ctrl/cmd alt/option):
So the problem turned out to be more serious than it seemed at first)
I tried to research this strange behavior with focusing on every key press, but no results for now.
Also tried to fix behavior by adding more conditions (exception) on shift and tab keys, but problem is that you can't catch shift + tab shortcut - firstly you catch Shift button press, after you are catching Tab (with pressed shift).
And if we catch Shift - we make blur() for event.target element and after that we have different behaviors in browsers (Safari loses previous focusable element and then start focusing on first element on page, and Chrome loses focus on current element, but after that still able to catch previous and next focusable elements), you may check next videos:
changed the title [-][$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+]on Nov 21, 2022
changed the title [-][Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][HOLD for payment 2022-11-29] [Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+]on Nov 22, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.29-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Nov 8, 2022
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 8, 2022
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Nov 8, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)melvin-bot commentedon Nov 8, 2022
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
[-]Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+]yevheniitsuryk commentedon Nov 8, 2022
Proposal
The actual problem is in these lines of code:
App/src/pages/home/report/ReportActionItem.js
Lines 171 to 174 in ea35c46
This fix was made according to this PR #8443 for this issue #7853
It's unfocusing the whole message including selected text, when you press any button.
So, I propose to add next condition/exception for shortcuts meta keys (CMD + Ctrl):
It's perfectly working in Safari, and other platforms. The previous issue is also fixed.
CleanShot.2022-11-08.at.22.49.06.mp4
parasharrajat commentedon Nov 8, 2022
Good find @yevheniitsuryk.
App/src/pages/home/report/ReportActionItem.js
Lines 171 to 174 in ea35c46
Based on the real issue, looks like we want to disable the blue border on
Shift+clickor say itShiftonly. So What about we restrict this keyDown handler to these combinations? It is important that this blue border is shown when the user usesShift+Tab orTab` for navigation.melvin-bot commentedon Nov 8, 2022
Looks like something related to
react-navigationmay have been mentioned in this issue discussion.As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our
DeprecatedCustomActions.jsfiles should not be accepted.Feel free to drop a note in #expensify-open-source with any questions.
yevheniitsuryk commentedon Nov 9, 2022
@parasharrajat actually if we remove fix with .blur(), it triggers focus on every keyPress (not only Shift key). Check it on video, on Safari all symbol keys, on Chrome literally every key (except functional keys like Ctrl/cmd alt/option):
CleanShot.2022-11-09.at.10.18.11.mp4
CleanShot.2022-11-09.at.12.28.14.mp4
So the problem turned out to be more serious than it seemed at first)
I tried to research this strange behavior with focusing on every key press, but no results for now.
Also tried to fix behavior by adding more conditions (exception) on shift and tab keys, but problem is that you can't catch shift + tab shortcut - firstly you catch Shift button press, after you are catching Tab (with pressed shift).
And if we catch Shift - we make blur() for event.target element and after that we have different behaviors in browsers (Safari loses previous focusable element and then start focusing on first element on page, and Chrome loses focus on current element, but after that still able to catch previous and next focusable elements), you may check next videos:
CleanShot.2022-11-09.at.12.42.59.mp4
CleanShot.2022-11-09.at.12.46.20.mp4
I think in this case we should solve the root of the issue - disable focusing on elements on every key press. So I'm still researching.
37 remaining items
melvin-bot commentedon Nov 21, 2022
@puneetlath, @parasharrajat, @rushatgabhane Eep! 4 days overdue now. Issues have feelings too...
puneetlath commentedon Nov 21, 2022
@parasharrajat @rushatgabhane sent you hiring offers in Upwork.
https://www.upwork.com/jobs/~01e0681ffe1aaa24a7
[-][$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+][-][Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/-][+][HOLD for payment 2022-11-29] [Hold for payment 2022-11-21] [$250] Mac / Safari : After selecting a text via mouse and then using`CMD+C` to copy it does not work reported by @parasharrajat[/+]melvin-bot commentedon Nov 22, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.29-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2022-11-29. 🎊
After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Nov 22, 2022
puneetlath commentedon Nov 22, 2022
@rushatgabhane quick bump on accepting the hiring offer. Then we'll be able to close this out. Thanks!
rushatgabhane commentedon Nov 23, 2022
Thanks @puneetlath, accepted!
puneetlath commentedon Nov 28, 2022
All paid!