Skip to content
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

Right click fires other events #3973

Closed
harelyshau opened this issue Feb 14, 2024 · 9 comments
Closed

Right click fires other events #3973

harelyshau opened this issue Feb 14, 2024 · 9 comments

Comments

@harelyshau
Copy link

This is copy of this issue: #3936 as I didn't get any response there. Might be helpful to read it initially.

OpenUI5 version: latest (1.120.7)

Browser/version (+device/version): Chrome, Firefox, Safari (all on MacOS)

URL (minimal example if possible):
https://harelyshau.dev/#/minesweeper (most priority for me)
https://openui5.hana.ondemand.com/entity/sap.m.IconTabBar/sample/sap.m.sample.IconTabBar
https://openui5.hana.ondemand.com/entity/sap.tnt.ToolHeader/sample/sap.tnt.sample.ToolHeaderIconTabHeader

Steps to reproduce the problem:

For custom button:

  1. Go to this link: https://harelyshau.dev/#/minesweeper
  2. Left click to any cell
image 3) Right click to any closed cell image 4) Again right to cell which is clicked on step 3 image As a result left click (press event) is also fired. But I think shouldn't be

For IconTab:

  1. Click right button to one of the following controls:
    IconTabFilter (1st link)
    IconTabHeader (2nd link)
    I'm using right click and left click with pressed ctrl button (should be the same result, but might be different)
  2. Left Click to empty space
    And you will see that time to time events like select or liveChange are triggered by this scenario
    Video link:
    https://1drv.ms/v/s!AhK9R225yn15a94Enfuo3KDccoI?e=VvVR2Q
    What is the expected result?
    Just open context menu without triggering extra events

What happens instead?
Context menu is opened but with extra triggering of events

Any other information? (attach screenshot if possible)
I've found that when I implemented custom button this way (just add one more event for handling right click). And I found that right click also triggers simple press event in button. I didn't expect that and tried with default button and there I wasn't be able to reproduce it and found other controls which have similar issue. Seems it's not all controls which have this behaviour but it's what I found quickly
image

Video link: https://1drv.ms/v/s!AhK9R225yn15a94Enfuo3KDccoI?e=VvVR2Q

@boghyon
Copy link
Contributor

boghyon commented Feb 21, 2024

The issue is not relevant to Windows users but seems to be only related to the macOS specific behavior that allows users opening the context menu with the control + left click combination: https://support.apple.com/guide/mac-help/right-click-mh35853/mac


@harelyshau

I found that right click also triggers simple press event in button.

I'm not able to reproduce the behavior neither with nor without the control key. Tried with the custom minesweeper button, Demo Kit sample button, and the plain HTML button on macOS.

Is the button issue still valid?

Other cases such as the IconTabBar can be still reproduced on macOS but only with the combination control + left click. Since there are other ways to open context menus, and since opening a context menu with the combination is a macOS-only feature, I wonder to which extend the described issue is really relevant to users of the affected controls.

@harelyshau
Copy link
Author

Hi @boghyon
Issue with my custom minesweeper button is still valid. It's reproduciable for me every time with control + left click or right click. Steps to reproduce it I provided above.
image
image
image

@harelyshau
Copy link
Author

Regarding second part of your comment:
Probably on Windows it might be possible with Shift+F10. I think it's not urgent defect for end user but still something what needs to be fixed with low priority.
Some use case which I can imagine:
If user made this right click with control button and checked the options and see that there is no something suitable (for ex for IconTabBar user might suggest that there should be option "open link in new tab") and he decided to close context window and select event is fired what might confuse.

@harelyshau
Copy link
Author

Just interesting observation:
The behaviour different in SAPUI5 and OpenUI5:
It's reproducible for IconTabHeader with control + click for both frameworks, but for SAPUI5 it's reproducible with simple right click as well (probably it's not merge in SAPUI5 yet).

https://openui5.hana.ondemand.com
https://sapui5.hana.ondemand.com

@boghyon
Copy link
Contributor

boghyon commented Mar 4, 2024

Which macOS version are you testing with? Which options for the "Secondary click" are set in your system?

Without holding the Control key pressed, try with:


Probably on Windows it might be possible with Shift+F10

Just checked; not reproducible with Shift+F10 either.


for SAPUI5 it's reproducible with simple right click as well (probably it's not merge in SAPUI5 yet).

Yes, ui5.sap.com or sapui5.hana.ondemand.com currently responds with SAPUI5 1.120.6 (built at 03.02.2024 17:13:00). The change ce99a79 is available since 1.121 so far.

@harelyshau
Copy link
Author

harelyshau commented Mar 5, 2024

hi @boghyon.
I'm using macOS 14.1.1 with Google Chrome Version 122.0.6261.69 (Official Build) (arm64).
Also reproducible for me in Safari, Edge, Firefox, Yandex browsers.

I'm using macbook touchpad only with ctrl + click or just right click from touchpad (in my settings it's pressing by two fingers at one time) to fire right click.

Probably soon I will be able to check on Windows as well. Then I let you know.

@harelyshau
Copy link
Author

Yep, seems on Windows it's working fine with my custom button.

@i556484
Copy link
Member

i556484 commented Apr 3, 2024

Hello @harelyshau ,
Thank you for sharing this finding. I've created an internal incident DINC0089446. The status of the issue will be updated here in GitHub.

@didip1000
Copy link
Contributor

Hey @harelyshau,

The fix is available now on master (linked above) and will be coming to release version 1.129.

Thanks,
Diana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants