-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2022-05-20][$4000] Windows - Cursor move to next line if you press Enter #7715
Comments
Triggered auto assignment to @chiragsalian ( |
Hmm i'm not able to reproduce this on staging or production. Are you still able to consistently reproduce this and are you sure the shift key was not held? |
Friendly bump, any update to my question above @kbecciv? 🙂 |
@chiragsalian Yes, I am consistently reproduce this issue, no shift key was held for this action. |
Hmm weird, I cannot reproduce. Anyway no worries i'll open it up to contributors that can test and figure out the problem. |
Triggered auto assignment to @michaelhaxhiu ( |
I also cannot reproduce this bug, and that's typically a mandetory step for me as a contributor manager before exporting assigning this job to upwork. In order to proceed, I think we need more context on how to reproduce this issue. I followed steps under "Action Performed" and whenever I hit |
@michaelhaxhiu @chiragsalian I understand that you may have an issue reproducing the issue. It is not repro on MacOS. We have multiple users who are facing this and it seems to be Device specific. Issue was not happening in the past, and we believe it is a regression from some PR. |
@mvtglobally In any case Do those laptops have a touch screen? |
@parasharrajat i can ask others, but my laptop has a touchscreen where I can repro the issue |
Gotcha. Ok, I can see which PR caused it and why? This is the culprit code
Although, the last commit is mine 😸. But this change was originally added #7355 . In Short, if a device has a touch screen Enter to submit shortcut is disabled. But I see that it can be irritating for touch screen laptop users who are not really using the touchscreen. |
@michaelhaxhiu, did you post this job in upwork? If not please do. Looks like it's specific to touchscreen devices. @parasharrajat, thanks for the find. I'm not sure if the last statement is a solution. Either way, can you explain where you'll be adding the code and what would it be for clarity. Additionally, I was curious if this is something you can test or not? Worst case we can still push out the fix and ask QA if it's been resolved. |
I haven't proposed anything yet #7715 (comment) is an explanation of the root cause. I don't see any solution that allows us to detect that the user is using an external keyboard so we will have to detect that the user is on desktop. I will try to find a bulletproof solution for it. |
Cool, thanks for clarifying. I'll bump this down to weekly since i don't feel like its a daily. If anyone disagrees feel free to bump it up. |
done |
I meant feature detection for detecting if a device is a desktop with an external keyboard.
This was/is a testing method on a few CSS frameworks like bootstrap. But I feel like, it is going to be buggy. At last, until we break anything for users that are using |
As far as I could find, people count time and make assumptions based on time between So in my updated proposal: PROPOSALin my solution we are going to create new folder/files within https://github.com/Expensify/App/tree/main/src/libs/ with the content: /**
* Allows us to identify whether the platform is mobile.
*
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
*
* @returns {Boolean}
*/
function isMobile(){
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent);
}
export default isMobile; index.native.js: function isMobile() {
return true;
}
export default isMobile; And use it here instead of use App/src/libs/VirtualKeyboard/index.js Lines 16 to 26 in fd0f83a
After changes: /**
* As of January 2022, the VirtualKeyboard web API is not available in all browsers yet
* If it is unavailable, we default to assuming that the virtual keyboard is open on mobile devices.
* See https://github.com/Expensify/App/issues/7715 for additional context.
*
* @returns {Boolean}
*/
function shouldAssumeIsOpen() {
const isOpened = isOpen();
return _.isNull(isOpened) ? isMobile() : isOpened;
} |
What do you think about this? |
Sorry I didn't get what you want... If you mean where we will use it: App/src/pages/home/report/ReportActionCompose.js Lines 342 to 344 in 6ef2e51
Instead of use canUseTouchScreen() and assume when canUseTouchScreen = true the device is mobile we will use the userAgent check to tell us when we are on mobile devices(only when we don't have the API available)
|
ok. I think this mobile userAgent check is best suited for Rest, I am fine with @mateusbra's approach to this problem #7715 (comment). I was waiting on a proposal with feature detection but there is no such API atm. And @mateusbra's reason for dimensions check seems valid. cc: @chiragsalian 🎀 👀 🎀 C+ reviewed |
Proposal LGTM as well. Feel free to create the PR @mateusbra. |
📣 @mateusbra You have been assigned to this job by @chiragsalian! |
I submitted a proposal on Upwork, gonna rise a PR soon! |
Hired - let's get this party started. |
Issue not reproducible during KI retests. (First week) |
Issue not reproducible during KI retests. (Second week) |
This issue has not been updated in over 15 days. @michaelhaxhiu, @chiragsalian, @parasharrajat, @mateusbra eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
PR deployed on PROD 4 days back. |
Just a quick bud check -- so does that mean payment is due on Friday for @mateusbra, assuming no regressions between now & then. Weird the GH title didn't update to add that 🤔 |
Yeah, Please update the title. It must be due to the wrong link format used on PR. Please update that as well if possible. |
@parasharrajat can you apply for this job - https://www.upwork.com/jobs/~0112030d1e6d50fa17 for the C+ work |
@mateusbra has been paid. |
Issue not reproducible during KI retests. (Third week) |
Waiting for you to accept job offer @parasharrajat 👍 |
Paid. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Message should be sent after press Enter
Actual Result:
Cursor move to next line if you press Enter
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.38.1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Enter.1102.mp4
Recording.208.mp4
Upwork job link: https://www.upwork.com/jobs/~01e9d1a86d39175b4d
Issue reported by: Applause
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: