SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.56k stars 267 forks source link

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

Closed sfsf-xweb-sh closed 2 years ago

sfsf-xweb-sh commented 3 years ago

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

Affected components (if known) ui5-card

Organization: (if applicable) SFSF

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

ilhan007 commented 3 years ago

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

georgimkv commented 3 years ago

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 commented 3 years ago

hi,

any updates of this ticket.

georgimkv commented 3 years ago

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.

tsanislavgatev commented 3 years ago

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 commented 3 years ago

@tsanislavgatev thanks, is there any updates for it?

alex-zhang commented 3 years ago

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 commented 3 years ago

Pending Release - Fri 12 Nov

sfsf-xweb-sh commented 2 years ago

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 commented 2 years ago

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

tsanislavgatev commented 2 years ago

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/

https://user-images.githubusercontent.com/11508737/157867734-bdac919e-d8a3-4e9c-ac0f-f271123f5d9d.mov

Can you please check it again?

Best Regards, Tsanislav

sfsf-xweb-sh commented 2 years ago

@tsanislavgatev hi, thanks for your reply.

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

image
tsanislavgatev commented 2 years ago

Hello @sfsf-xweb-sh ,

https://user-images.githubusercontent.com/11508737/159863895-3b474de0-dd7d-4062-a2c7-daeec7c188f4.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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

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