You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$1000] mWeb - Long pressing message shows item selected in Menu at the touch point #23191
Long press on any message to open menu
(Long press at the position when any item of menu can be hit)
Expected Result:
It should just open the menu
Actual Result:
It opens the menu with item hovered effect
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.42-19 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
Please re-state the problem that we are trying to solve in this issue.
Long pressing message shows item selected in Menu at the touch point
What is the root cause of that problem?
The root cause of the issue is that we're wrapping MenuItem inside Hoverable component. The Hoverable component uses onMouseEnter and onMouseLeave events to set the hover state. These events are supported on web but not on mobile browsers. This is causing the weird behaviour.
What changes do you think we should make in order to solve the problem?
We need to not use Hoverable component on mobile web. The Hover functionality should be used on desktop web only. It can be removed by simply adding a Browser.isMobile condition here that sets / unsets the clone options if the browser is of mobile.
What alternative solutions did you explore? (Optional)
Instead of removing the whole clone option, we can also remove onMouseEnter and onMouseLeave options and replace them with onTouchStart and onTouchEnd events.
These events are supported on web but not on mobile browsers
This is false, onMouseEnter and onMouseLeave is supported on mobile web. We have a PR that will completely disable hover on devices without hover support.
changed the title [-]mWeb - Long pressing message shows item selected in Menu at the touch point[/-][+][$1000] mWeb - Long pressing message shows item selected in Menu at the touch point[/+]on Jul 20, 2023
Please re-state the problem that we are trying to solve in this issue.
To prevent the long-press menu item from showing a hover effect on touch devices in the React iOS application.
What is the root cause of that problem?
The root cause of the issue is the Hoverable component's usage, relying on onMouseEnter and onMouseLeave events, which are supported on web but not on mobile browsers.
What changes do you think we should make in order to solve the problem?
We propose implementing a custom long-press handler for touch devices and conditionally using the Hoverable component only for desktop web. Additionally, we introduce a state variable, isTouchDevice, to determine if the device is touch-enabled. The custom event handlers are set accordingly to handle the long-press behavior without triggering the hover effect on the menu items.
for example:
What alternative solutions did you explore? (Optional)
We considered removing the Hoverable component on mobile web based on the client's suggestion, but the client did not accept this approach. We also explored replacing onMouseEnter and onMouseLeave with onTouchStart and onTouchEnd events, but the client indicated that onMouseEnter and onMouseLeave are supported on mobile web and that they have a PR to handle hover on devices without hover support. As a result, we believe the proposed solution provides the best compromise between touch and desktop web interactions, allowing the menu to open without triggering the hover effect on both touch and desktop devices.
@mollfpr@lschurr 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!
Activity
melvin-bot commentedon Jul 19, 2023
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 19, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)allroundexperts commentedon Jul 19, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Long pressing message shows item selected in Menu at the touch point
What is the root cause of that problem?
The root cause of the issue is that we're wrapping
MenuIteminsideHoverablecomponent. TheHoverablecomponent usesonMouseEnterandonMouseLeaveevents to set the hover state. These events are supported on web but not on mobile browsers. This is causing the weird behaviour.What changes do you think we should make in order to solve the problem?
We need to not use
Hoverablecomponent onmobile web. TheHoverfunctionality should be used on desktop web only. It can be removed by simply adding aBrowser.isMobilecondition here that sets / unsets the clone options if the browser is of mobile.Doing so will also fix the issue that @michaelhaxhiu found here.
What alternative solutions did you explore? (Optional)
Instead of removing the whole
cloneoption, we can also removeonMouseEnterandonMouseLeaveoptions and replace them withonTouchStartandonTouchEndevents.bernhardoj commentedon Jul 20, 2023
This is false,
onMouseEnterandonMouseLeaveis supported on mobile web. We have a PR that will completely disable hover on devices without hover support.[-]mWeb - Long pressing message shows item selected in Menu at the touch point[/-][+][$1000] mWeb - Long pressing message shows item selected in Menu at the touch point[/+]melvin-bot commentedon Jul 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~011ecfe619c9cb6746
melvin-bot commentedon Jul 20, 2023
Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)proshir commentedon Jul 20, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
To prevent the long-press menu item from showing a hover effect on touch devices in the React iOS application.
What is the root cause of that problem?
The root cause of the issue is the Hoverable component's usage, relying on onMouseEnter and onMouseLeave events, which are supported on web but not on mobile browsers.
What changes do you think we should make in order to solve the problem?
We propose implementing a custom long-press handler for touch devices and conditionally using the Hoverable component only for desktop web. Additionally, we introduce a state variable, isTouchDevice, to determine if the device is touch-enabled. The custom event handlers are set accordingly to handle the long-press behavior without triggering the hover effect on the menu items.
for example:
What alternative solutions did you explore? (Optional)
We considered removing the Hoverable component on mobile web based on the client's suggestion, but the client did not accept this approach. We also explored replacing onMouseEnter and onMouseLeave with onTouchStart and onTouchEnd events, but the client indicated that onMouseEnter and onMouseLeave are supported on mobile web and that they have a PR to handle hover on devices without hover support. As a result, we believe the proposed solution provides the best compromise between touch and desktop web interactions, allowing the menu to open without triggering the hover effect on both touch and desktop devices.
7 remaining items
melvin-bot commentedon Jul 27, 2023
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
mollfpr commentedon Jul 31, 2023
I can't reproduce it on the latest DEV.
mWeb/Safari
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-07-31.at.17.52.39.mp4
mWeb/Chrome
untitled.webm
melvin-bot commentedon Aug 2, 2023
@mollfpr @lschurr 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!
lschurr commentedon Aug 2, 2023
Sounds like this one can be closed - I believe we need to pay @DinalJivani for reporting.
lschurr commentedon Aug 2, 2023
@DinalJivani could you apply to the job here so that we can pay the reporting bonus of $250? https://www.upwork.com/jobs/~011ecfe619c9cb6746
melvin-bot commentedon Aug 3, 2023
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
lschurr commentedon Aug 7, 2023
Bumped @DinalJivani in Slack.
lschurr commentedon Aug 7, 2023
Payment summary:
All set. Closing.