ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[SF][Slider]: [The change of the slider will activate the rowClick of the table]

Open tandan0813 opened this issue 1 year ago • 15 comments

Bug Description

Please refer the isolated environment: https://stackblitz.com/edit/github-6fwjgfte?file=src%2FApp.tsx

When adjusting the slider within a table cell, the table's rowClick event is also triggered. In the isolated environment, an alert will be displayed when the slider value changes

Affected Component

Slider

Expected Behaviour

No response

Isolated Example

Steps to Reproduce

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.7.1

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

tandan0813 avatar Feb 14 '25 06:02 tandan0813

Hi @tandan0813,

Could you please check if in https://github.com/SAP/ui5-webcomponents/issues/10634 is reported the same problem?

Regards, Nayden

nnaydenow avatar Feb 14 '25 07:02 nnaydenow

Looks the same, but I think it's good to have them separate, should be more convenient to the responsible team.

ilhan007 avatar Feb 14 '25 08:02 ilhan007

Hello @SAP/ui5-webcomponents-topic-rl,

please check this issue, note that it's possible to be resolved by https://github.com/SAP/ui5-webcomponents/issues/10634

Thanks and Best Regards, Dobrin

dobrinyonkov avatar Feb 14 '25 09:02 dobrinyonkov

@dobrinyonkov #10634 only resolves the tooltip behavior. We need this fixed for the click on the slider inside a table.

jatinthaker avatar Feb 14 '25 18:02 jatinthaker

@ilhan007 Just wonder if we can quickly fix the click propagation issue by adding e.stopPropagation() at the beginning of this function. https://github.com/SAP/ui5-webcomponents/blob/c22467261d7598fdc080fde214bf737142715865/packages/main/src/Slider.ts#L172

zhangliangyi avatar Feb 18 '25 06:02 zhangliangyi

@zhangliangyi

Please do not add stopPropagation, otherwise you have to do the same for every component you place in to the table.

What is about adding the target or the original event to the TableRowClickEventDetail? So you can still decide what to do, if a slider inside a table was clicked.

veith avatar Feb 18 '25 11:02 veith

@veith However, I can't get the originalTarget node when table's row is clicked from the Event. So on the user side, when rowClick event is executed , it's not known whether the slider or the other node initiated it at the beginning.

tandan0813 avatar Feb 19 '25 02:02 tandan0813

Hello colleagues,

I don’t believe this is an issue with the ui5-slider component itself. During testing, I observed that if I drag the slider handle using mousedown and then release it with mouseup while the cursor remains over the handle, only the change event is triggered—without firing the rowClick event.

However, the rowClick event does get triggered if, upon mouseup, the cursor is positioned over a Table Cell. I was able to reproduce this behavior using a native button: when pressing mousedown on the button, moving the cursor outside of it, and then releasing mouseup inside the Table Cell (with added margins to extend the cell), the same issue occurs.

I have also recorded a video demonstrating this behavior with a native button. Based on my findings, I believe this is related to the Table component rather than the Slider, so I am forwarding the issue to the relevant colleagues handling the Table component.

https://github.com/user-attachments/assets/cb9ee6a7-53ed-4c72-a489-8f4067d57eaf

Best regards, Ivaylo

ivoplashkov avatar Feb 25 '25 09:02 ivoplashkov

I submitted a correction last week #10833 Please retest with the nightly version

aborjinik avatar Feb 27 '25 11:02 aborjinik

is it ok downport the fix to 2.7.4? Successfactors is 2 weeks away from 2505 release, we need a 2.7.x to fix this issue in Successfactors application. Thanks.

shuang2shi avatar Mar 03 '25 01:03 shuang2shi

the fix is in 2.7.4: https://github.com/SAP/ui5-webcomponents/commit/1f063b62f474bcb8b0bfb7f3c1af477934a31d24

aborjinik avatar Mar 04 '25 20:03 aborjinik

Thank you!

shuang2shi avatar Mar 05 '25 05:03 shuang2shi

Hi @aborjinik Tried it in Firefox and found that the issue still persists, so please help reopen this issue.

tandan0813 avatar Apr 07 '25 06:04 tandan0813

Hi @aborjinik there is some problem with the fix under Firefox, the author created a new issue https://github.com/SAP/ui5-webcomponents/issues/11279

ilhan007 avatar Apr 08 '25 06:04 ilhan007

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Apr 08 '25 06:04 github-actions[bot]