-
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: form controls in item are not interactive on start/end #27169
Labels
Comments
3 tasks
liamdebeasi
added
package: core
@ionic/core package
type: bug
a confirmed bug report
labels
Apr 11, 2023
2 tasks
This was referenced Aug 9, 2023
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 20, 2023
…#28136) Issue number: Resolves #27169 --------- <!-- 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? <!-- Please describe the current behavior that you are modifying. --> Clicking the padded space within an `ion-item` will not pass the click event to the slotted `ion-radio`, `ion-checkbox`, `ion-select` or `ion-toggle`. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The padded space at the start of `.item-native` and at the end of `.item-inner` is clickable to activate a control. - When the item is clicked, we check if the event is a result of clicking the control or clicking the item's padded space. If the click event is on the control, we don't need to do anything and let the default behavior occur. If the click event is on the padded space, we manually call the `.click()` method for the interactive element. - The cursor pointer displays when hovering over the padded space when a slotted interactive control is present. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
liamdebeasi
pushed a commit
that referenced
this issue
Sep 22, 2023
…#28136) Issue number: Resolves #27169 --------- <!-- 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? <!-- Please describe the current behavior that you are modifying. --> Clicking the padded space within an `ion-item` will not pass the click event to the slotted `ion-radio`, `ion-checkbox`, `ion-select` or `ion-toggle`. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The padded space at the start of `.item-native` and at the end of `.item-inner` is clickable to activate a control. - When the item is clicked, we check if the event is a result of clicking the control or clicking the item's padded space. If the click event is on the control, we don't need to do anything and let the default behavior occur. If the click event is on the padded space, we manually call the `.click()` method for the interactive element. - The cursor pointer displays when hovering over the padded space when a slotted interactive control is present. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
liamdebeasi
pushed a commit
that referenced
this issue
Sep 26, 2023
…#28136) Issue number: Resolves #27169 --------- <!-- 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? <!-- Please describe the current behavior that you are modifying. --> Clicking the padded space within an `ion-item` will not pass the click event to the slotted `ion-radio`, `ion-checkbox`, `ion-select` or `ion-toggle`. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The padded space at the start of `.item-native` and at the end of `.item-inner` is clickable to activate a control. - When the item is clicked, we check if the event is a result of clicking the control or clicking the item's padded space. If the click event is on the control, we don't need to do anything and let the default behavior occur. If the click event is on the padded space, we manually call the `.click()` method for the interactive element. - The cursor pointer displays when hovering over the padded space when a slotted interactive control is present. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Item adds margin to the start and end of the line which means that clicking those spaces causes form controls to not be interactive. In Ionic 6 we had a CSS hack to create an interactive element inside of the form control that covers the entire item:
ionic-framework/core/src/components/radio/radio.scss
Lines 65 to 67 in cb8f07c
This resolves the issue for the end margin, but the start margin still was not interactive even in Ionic 6.
Expected Behavior
The checkbox should get checked.
Steps to Reproduce
Code Reproduction URL
https://codepen.io/liamdebeasi/pen/wvYKaEm
Ionic Info
N/A
Additional Information
No response
The text was updated successfully, but these errors were encountered: