Open IuliiaHerets opened 3 weeks ago
Triggered auto assignment to @OfstadC (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think that this bug might be related to #wave-collect - Release 1
@OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Edited by proposal-police: This proposal was edited at 2024-10-31 09:57:22 UTC.
Chat - Cursor moves several characters when deleting markdowns on multiline message
The problem comes from react-native-live-markdown
package.
The package has custom cursor management logic and those works well. The issue occurs because the custom cursor management logic runs faster than React’s native text update. As a result, the cursor is repositioned too early. When React completes its slower text update, it overwrites the manually set cursor position, causing it to be incorrect. This timing mismatch leads to the cursor jumping to the wrong place.
Wrapping this code in InteractionManager
will solve the problem
InteractionManager.runAfterInteractions(()=> {
if (shouldForceDOMUpdate || targetElement.innerHTML !== dom.innerHTML) {
const animationTimes = getAnimationCurrentTimes(targetElement);
targetElement.innerHTML = '';
targetElement.innerText = '';
targetElement.innerHTML = dom.innerHTML;
updateAnimationsTime(targetElement, animationTimes);
}
updateTreeElementRefs(tree, targetElement);
targetElement.tree = tree;
moveCursor(isFocused, alwaysMoveCursorToTheEnd, cursorPosition, targetElement, shouldScrollIntoView);
})
We can wrap this code in an InteractionManager instead above one, but that will cause the cursor to jump up and down.
I did not experience this. I also think this is kind of an odd scenario that is unlikely to occur for a user (must have 5 line breaks and 3 markdowns seems like an odd equation ) - So going to close this out
@OfstadC The bug is actual now, and it happens even with 1 or 2 line breaks. I am Sorry but I think you should retest
https://github.com/user-attachments/assets/b49e791c-da17-4ff4-b9ea-8d1b5b997849
Job added to Upwork: https://www.upwork.com/jobs/~021847007161571207373
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
@OfstadC, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Hi @thesahindia. Did you notice my proposal above ?
@thesahindia could you please review the available proposal by EOD? Thank you 😃
I couldn't repro it. I tested on the latest dev version.
https://github.com/user-attachments/assets/d710a5e3-869d-429e-8668-0739574f6e95
@thesahindia It is reproducible in last main
https://github.com/user-attachments/assets/b3cb9521-b377-4082-a397-59a1a9b64ae8
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
I still can't repro it. @OfstadC, could you please look into it?
I still can't repro it. @OfstadC, could you please look into it?
@thesahindia Have you tested android mWeb ?
@OfstadC @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
I was able to repro it on mWeb. @shahinyan11, could you repro it on native or is it just a mWeb issue?
I was able to repro it on mWeb. @shahinyan11, could you repro it on native or is it just a mWeb issue?
I could repro only on mWeb
@OfstadC, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@shahinyan11, Could you retest your solution? Also could you please share the video of testing?
Updated Since the package was updated, the previous solution stopped working and I updated the proposal.
@thesahindia Here is the video
https://github.com/user-attachments/assets/dd3fa50f-7647-4737-b5c1-752a1d97fb74
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
I need to test some cases; I'll handle it on Monday since it's the weekend.
@OfstadC, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!
Any update @thesahindia 😃
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Bump @shahinyan11 Please update by EOD tomorrow 😃 Thanks!
Bump @shahinyan11 Please update by EOD tomorrow 😃 ThankS!
Hi @OfstadC . I think you have mentioned me by mistake anD it should be addressed to @thesahindia . If not, please clarify what update you mean.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.48-0 Reproducible in staging?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The cursor should move only one character at the time while deleting markdowns at the end of a message.
Actual Result:
When deleting the markdowns at the end of a multiline message while editing, the cursor moves several characters at the time.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/1648cb08-1348-4926-a0a0-a03fc2650018
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @thesahindia