Focus the composer again after going back from a report not found#21962
Conversation
|
@narefyev91 Please 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] |
Reviewer Checklist
Screenshots/VideosWebweb.movweb2.movMobile Web - Chromeandroid-web.movMobile Web - Safariios-web.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
narefyev91
left a comment
There was a problem hiding this comment.
LGTM!
🎀 👀 🎀 C+ reviewed
| this.unsubscribeNavFocus = this.props.navigation.addListener('focus', () => { | ||
| if (this.willBlurTextInputOnTapOutside && !this.props.isFocused && !this.props.modal.isVisible) { | ||
| this.focus(); |
There was a problem hiding this comment.
Why disable the eslint check? Can we instead follow its instructions and return if the inverse of the condition is true?
There was a problem hiding this comment.
I agree, just updated.
|
Friendly ping @Julesssss |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.37-0 🚀
|
| if (!this.willBlurTextInputOnTapOutside || this.props.isFocused || this.props.modal.isVisible) { | ||
| return; | ||
| } | ||
| this.focus(); |
There was a problem hiding this comment.
This is a bit of a random guess, but I'm seeing a new crash associated and I'm curious if:
- It's possible this change is the cause
- Or maybe this exception simply occurred during testing? (do you have a Pixel 5 by any chance?)
Non-fatal Exception: io.invertase.firebase.crashlytics.JavaScriptError: Cannot read property 'focus' of null
at .anonymous(address at index.android.bundle:1:2694129)
at .apply((native):0:0)
at .anonymous(address at index.android.bundle:1:237083)
at ._callTimer(address at index.android.bundle:1:236365)
at .callTimers(address at index.android.bundle:1:238167)
at .apply((native):0:0)
at .__callFunction(address at index.android.bundle:1:140250)
at .anonymous(address at index.android.bundle:1:138615)
at .__guard(address at index.android.bundle:1:139568)
at .callFunctionReturnFlushedQueue(address at index.android.bundle:1:138573)
There was a problem hiding this comment.
How can I reprocedue it? Or source map?
There was a problem hiding this comment.
this is pretty strange - because we have all needed conditions to not get situation when this.textinput will null and we will try to focus
There was a problem hiding this comment.
Yeah, I could be wrong here. This was just the only loc that contained a focus() call since yesterdays build.
There was a problem hiding this comment.
How can I reprocedue it? Or source map?
I'm afraid we can't. That's why this is a bit of a random guess. If we don't think this was the cause then no further action is necessary 👍
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.37-7 🚀
|
|
Currently I see we removed back button on header when opening a non-exist report but we still need this PR when clicking back on browser. I will combine here and here to: componentDidUpdate(prevProps) {
...
if (this.willBlurTextInputOnTapOutside && this.props.isFocused && !this.props.modal.isVisible && (prevProps.modal.isVisible || !prevProps.isFocused)) {
this.focus();
}
...
} |
|
Hi @ginsuma, sure. If you create a PR please mention this issue |
Details
Compose box loses focus on coming back from 'Hmm... its not here' page.
Fixed Issues
$ #21678
PROPOSAL: #21678 (comment)
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
web.mov
Mobile Web - Safari
ios_safari.mov
Mobile Web - Chrome
android_chrome.mov
Desktop
desktop.mov
iOS
ios_app.mov
Android
android_app.mov