-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix the edit comment input getting focus when long-pressing on Android #13593
Conversation
@AndrewGable @thesahindia One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
this.textInput.focus(); | ||
// There is an animation when the comment is hidden and the edit form is shown, and there can be bugs on different mobile platforms | ||
// if the input is given focus in the middle of that animation which can prevent the keyboard from opening. | ||
focusTextInputAfterAnimation(this.textInput, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was testing this at physical android device and I experienced that the edit composer shakes a lit bit sometimes and sometimes the keyboard doesn't open
Screenrecording_20221215_154054.mp4
I think we can increase the delay. Maybe let's use 100ms same as here
setTimeout(() => this.textInput.focus(), 100); |
At 100ms -
Screenrecording_20221215_164307.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thank you for that testing! I originally had it set to 100, but I was only testing on an emulator (all I have access to) and it worked consistently at 10ms. I'm fine increasing that to 100 👍
Updated |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2022-12-15.at.11.37.43.PM.movMobile Web - Chromevideo_20221215_233711_edit.mp4Mobile Web - SafariCouldn't test this because my ip changed and it needs to be added to the whitelist again😔 DesktopScreen.Recording.2022-12-15.at.11.15.40.PM.moviOSScreen.Recording.2022-12-16.at.12.05.09.AM.movAndroidScreenrecording_20221215_234351.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by @AndrewGable in version: 1.2.41-0 🚀
|
🚀 Deployed to staging by @AndrewGable in version: 1.2.41-0 🚀
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.41-4 🚀
|
Fixed Issues
$ #11048
Tests
Mobile platforms:
Non-mobile platforms:
Offline tests
Same as above. There should be no difference in behavior
QA Steps
Same as above.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
2022-12-14_12-40-37.mp4
Mobile Web - Chrome
2022-12-14_12-39-24.mp4
Mobile Web - Safari
2022-12-14_12-49-25.mp4
Desktop
2022-12-14_12-42-09.mp4
iOS
2022-12-14_12-48-22.mp4
Android
2022-12-14_12-38-34.mp4