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

TreeSelect: panel hide after uncheck #5447

Closed
kl-nevermore opened this issue Nov 29, 2023 · 1 comment · Fixed by #5449
Closed

TreeSelect: panel hide after uncheck #5447

kl-nevermore opened this issue Nov 29, 2023 · 1 comment · Fixed by #5449
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@kl-nevermore
Copy link
Contributor

kl-nevermore commented Nov 29, 2023

Describe the bug

20231129181702_rec_

Reproducer

https://primereact.org/treeselect/#check

PrimeReact version

latest

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

return targetRef.current && !(targetRef.current.isSameNode(event.target) || targetRef.current.contains(event.target) || (overlayRef.current && overlayRef.current.contains(event.target)));

overlayRef.current.contains(event.target)
The selected state is rendered by svg,but contains not work for svg
image

About

https://stackoverflow.com/questions/57664614/why-is-svg-not-identified-inside-a-node-using-contain-method-using-javascript
https://stackoverflow.com/questions/66743891/why-a-click-on-svg-element-is-not-captured-by-node-contains-method

// can resolve it ,but may cause other problems
// or re-implement contains in DomHandler
svg{

 pointer-events: none;
}

Expected behavior

No response

@kl-nevermore kl-nevermore added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 29, 2023
@melloware melloware self-assigned this Nov 29, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 29, 2023
@melloware melloware added this to the 10.2.2 milestone Nov 29, 2023
@melloware
Copy link
Member

We already have the style.

svg.p-icon {
    pointer-events: auto;
}

svg.p-icon g,
.p-disabled svg.p-icon {
    pointer-events: none;
}

In ComponentBase.

melloware added a commit to melloware/primereact that referenced this issue Nov 29, 2023
@melloware melloware modified the milestones: 10.2.2, 10.3.0 Nov 29, 2023
melloware added a commit to melloware/primereact that referenced this issue Jan 9, 2024
melloware added a commit that referenced this issue Jan 9, 2024
* Fix #5444/#5443: Tailwind fixes

* Fix #5447: TreeSelect don't close panel on unselect

* Fix #5445: Tabview passthrough fixes

* Fix #5452: Datatable onRowEditChange typescript def

* Fix #5461: Passthrough case insensitve props

* Fix #5465: Sidebar passthrough fix

* Fix #5466: Slider remove handlers

* Fix #5464: Tailwind fixes

* Fix #5477: ComponentBase fkey refactor

* Fix #5461: Passthrough TS and casing issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants