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

[Safari/Firefox] will focus on header of ui5-card after clicking header's button #2951

Closed
sfsf-xweb-sh opened this issue Mar 17, 2021 · 16 comments · Fixed by #4235
Closed

[Safari/Firefox] will focus on header of ui5-card after clicking header's button #2951

sfsf-xweb-sh opened this issue Mar 17, 2021 · 16 comments · Fixed by #4235
Assignees
Labels

Comments

@sfsf-xweb-sh
Copy link

sfsf-xweb-sh commented Mar 17, 2021

hi,

I am from SuccessFactors Web Experience Shanghai team. My name is hubery and this account is our team account

Describe the bug
We add a button as an action slot to ui5-card. If the user click the button then the header will get the focus.

To reproduce

  1. open this link
  2. click the "Create Activity" button

Except Behavior
This behavior is correct in chrome browser. when the user click the action button in the card header, the header should not get the focus.

Screenshots
image

Context

  • UI5 Web Components version:SFSF version 0.29.7
  • OS/Platform: macOS
  • Browser (if relevant): Safari Version 14.0.2 (16610.3.7.1.9) and Firefox 85.0
  • Other information: {...}

Affected components (if known)
ui5-card

Organization: (if applicable)
SFSF

Priority: (optional) (Low, Medium, High or Very High)
Medium

@ilhan007 ilhan007 added bug This issue is a bug in the code TOPIC RD labels Mar 17, 2021
@ilhan007
Copy link
Member

Hello @SAP/ui5-webcomponents-topic-rd could you please see this issue, that happens in Safari and FF.

@georgimkv
Copy link
Contributor

May help in resolving the issue:
The bug only occurs when the "click" is on text in the button.
If instead, the icon in that button is clicked, the issue does not occur.

@sfsf-xweb-sh
Copy link
Author

hi,

any updates of this ticket.

@georgimkv georgimkv self-assigned this Apr 5, 2021
@georgimkv
Copy link
Contributor

Hello @SAP/ui5-webcomponents-topic-b. I believe this is an issue with the button not receiving a focus on Firefox and Safari under macOS. Please refer to the following codesandbox. Clicking on the icon within the button leaves the button focused, while clicking on the actual text in the button does not.

@georgimkv georgimkv removed their assignment Apr 5, 2021
@georgimkv georgimkv added TOPIC B and removed TOPIC RD labels Apr 5, 2021
@tsanislavgatev tsanislavgatev self-assigned this Jun 11, 2021
@tsanislavgatev
Copy link
Contributor

Hello colleagues,
There is a browser issue that in mozilla or safari on macOS, there are focus on the buttons, so no focusin or focus out will be fired. We're currently looking for a workaround solution.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus

@alex-zhang
Copy link

alex-zhang commented Aug 8, 2021

@tsanislavgatev thanks, is there any updates for it?

@alex-zhang
Copy link

alex-zhang commented Nov 2, 2021

hi, team.

The new version is fine for chrome, firefox, but the issue still exist in safari.

The behavior is when the user click the Add Learning button then the Panel Header will get the focus.
Expect behavior: when the user click the Add Learning button then the Panel Header should not get the focus.

> both in the list item button.

1

But it's strange that if the button has icon, and i click the icon part and the behavior is correct.

2

@ilhan007
Copy link
Member

Pending Release - Fri 12 Nov

ndeshev pushed a commit to ndeshev/ui5-webcomponents that referenced this issue Dec 13, 2021
@ilhan007 ilhan007 closed this as completed Feb 2, 2022
@sfsf-xweb-sh
Copy link
Author

hi, @ilhan007 can you please to open it again. I test in my local and it not fixed(for safari) with version 1.2.1.

@ilhan007 ilhan007 reopened this Mar 9, 2022
@ilhan007
Copy link
Member

ilhan007 commented Mar 9, 2022

Hello @tsanislavgatev could you check the issue. According to the author it's still reproducible with the latest version.

@tsanislavgatev
Copy link
Contributor

Hello @sfsf-xweb-sh ,

The issue is not reproducible for me.
I've tested it in playground with latest version:
https://sap.github.io/ui5-webcomponents/

Screen.Recording.2022-03-11.at.14.32.38.mov

Can you please check it again?

Best Regards,
Tsanislav

@sfsf-xweb-sh
Copy link
Author

@tsanislavgatev hi, thanks for your reply.

The case is in the card's slot for only safari browser.

image

@tsanislavgatev
Copy link
Contributor

Hello @sfsf-xweb-sh ,

Screen.Recording.2022-03-24.at.9.19.51.mov

My previous video was also in safari.
I am attaching a video also from safari and card test page:

Best Regards,
Tsanislav

@sfsf-xweb-sh
Copy link
Author

hi, @tsanislavgatev

thanks for you reply.

Please help check it again, It's work not work for me.

I'll give you my local env, below:

OS: MacOS Monterey Version 12.2.1(21D62)
Safari: Version 15.3 (17612.4.9.1.8)

image

@tsanislavgatev
Copy link
Contributor

Hello @sfsf-xweb-sh,

This issue isn't reproducing after mouse up.

We've tested it on few more computers on latest versions of MacOS and Safari.

Can you please check if the focus is set on mouse up, as it's when the click is fired.

Best Regards,
Tsanislav

@sfsf-xweb-sh
Copy link
Author

hi, please help close this ticket and thanks for your updates and reply.

it's seems works with latest versions of MacOS and Safari.

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