Since I updated to RC.3, the button click handler is not raised any more. Only when I remove the click handler from the ion-item, the button click handler is called. Is this a bug? Or am I doing something wrong? But it used to work as expected…
I’m seeing similar behavior with RC.3 with the menu button to activate the side menu and also the back button. Clicking directly on the button doesn’t do anything but clicking about 20 pixels to the right of the button activates it. That “hot” area on the right is about 5 pixels wide. The same code worked in RC.2.
I opened an issue a about this since the same behavior occurred with the latest ionic-conference-app.
Have you tried this? It doesn´t work here. I can add the ion-item to my button, but it is only clickable if the parent ion-item has no click event registered (actually same behaviour as without the ion-item attribut on button). The only thing the ion-item attribute on the button does seems to be styling (bigger clickable area)
Well, my scenario is that I have an ion-list with ion-items. When clicking on an item (100% width), the item gets marked as selected. Every item can contain subitems and therefore I have an expand toggle-button at the left side of each item which is a button that also has a registered click event.
This worked very naturally until I updated to rc.3…
You are right, that works. And you brought me closer to my real problem
In my setup I actually use a ion-grid to layout the content of the ion-item. And if i put the button in an ion-grid/ion-row/ion-col then also in your plunker only the ion-item event is raised.
in your code ion-label and ion-grid are siblings, in my code ion-label is the container for ion-grid…I am at a loss now, I don´t understand how my template causes this…
Button elements inside a clickable ion-item only work if they have “item-right” or “item-left” attributes. If you have a button in the body of the item then it will not respond to click events.
Hey Buddy, I have gone through such problem few months back, I also had a button inside the ion-item. Then I came across the solution to use a “ion-stop-event=“click”” ionic directive .
So the code snippets would be like: