-
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
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
How can I reprocedue it? Or source map?
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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