-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Overlays override id assigned through htmlAttributes #29712
bug: Overlays override id assigned through htmlAttributes #29712
Comments
This issue has been labeled as If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation. Thank you! |
If anyone from the community is interesting in contributing, you can reference #29708 for the changes required to fix this issue (same approach would be applied to other overlays) and the test code to validate the fix. |
I'm going to pick this up and start work! |
Issue number: resolves #29712 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? In every type of overlay, the auto incremented overlay id is overwriting any id set in htmlAttributes. ## What is the new behavior? The id in htmlAttributes now takes precedence. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: Sean Perkins <[email protected]>
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
Split from: #29704
In Ionic v8, overlays are overriding the
id
specified in thehtmlAttributes
with the incremental overlay ID assigned by Ionic Framework.Applies to: modal, popover, action-sheet, loading, picker-legacy and toast.
Expected Behavior
Ionic's overlay should not assign the incremental overlay ID if the overlay already has an ID assigned to it by either the
id
attribute directly or thehtmlAttributes
.Steps to Reproduce
htmlAttributes
This applies to all overlays except
ion-alert
, which has been resolved: #29708For the reproduction URL we can either use the original reproduction and replace the alert with another overlay or assign
htmlAttributes
with anid
property to any other overlay to observe the problem.Code Reproduction URL
N/A
Ionic Info
N/A - reproduces in Ionic v8+.
Additional Information
No response
The text was updated successfully, but these errors were encountered: