Files
twenty/packages
Naifer f5835a77e5 fix: prevent LinkAvatarChip from triggering page reload when table cells or inline cells are in edit mode (#12734)
resolve #11075
The issue was that when inline cells or table cells are in edit mode, a
click outside event listener is active, and its callback calls
event.stopImmediatePropagation(). This prevents the onClick of LinkChip
from firing, allowing the browser's default behavior to trigger the 'to'
link and cause a full page reload.

To fix this, I added event.preventDefault() inside each click outside
callback to stop the browser from reloading.

Another possible solution: check if currentTableCellInEditModePosition
or isInlineCellInEditMode is true, and if so:

Either convert the StyledLink in LinkChip into a div

Or set forceDisableClick = true, which falls back to AvatarChip.

Before:


https://github.com/user-attachments/assets/7ffd76fd-988e-484b-bad6-10e0147502c2

After:


https://github.com/user-attachments/assets/18cfbc0e-8af6-4ecc-862e-a2b8f02e2535

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-07-08 09:15:08 +00:00
..
2025-06-23 13:34:35 +02:00
2025-06-06 18:35:30 +02:00
2025-06-06 18:35:30 +02:00