bug: Ion-list: Mutiple delete or reorder buttons
Type: bug
Platform: all
I have an ion-list with ion-items. The delete and reorder functions are active. I have a button to activate the delete function
- in the header
- at the top of my list
- at the bottom of my list
Codepen: http://codepen.io/paulking00/pen/ByYbpv
Working Scenario:
Click on the delete button in the header once to activate, then again to deactivate.
Bug Condition:
When there is only 1 Delete Activate Button and it is clicked, all other buttons on the page are not clickable, except the new delete buttons beside each item and the Delete Activate button which was just clicked.
However when there is more than one Delete Activate button, only the first one on the page is clickable to be able to disactive delete mode.
Bug Example:
Clicking on the Delete Activate button at the bottom of the list will activate delete mode. It cannot be clicked again to disactivate delete mode.
The same goes for the Delete Activate button at the top of the list. Delete mode can only be deactivated by the first delete button on the page.
Further Info:
Exactly the same thing happens with the Reorder button.
This is expected. When reorder/delete buttons are shown, we block any click events that aren't to the reorder or delete buttons to prevent any accidental clicks to the items.
Hi Mike! Thanks for your reply.
One quick follow-on question given that: what counts as a delete button?
I have removed those in the Header bar, and now just use my own, and I can get in to delete mode, but then never back out again. I am using Chrome to test.
please see new Codepen to illustrate issue.
http://codepen.io/paulking00/pen/qEYgYz?editors=101
same goes for Reorder, as in the example.
Maybe I was a little unclear. So by delete/reorder buttons, I mean ion-delete and ion-reorder. Since those buttons that are used to toggle delete and reorder, their events are blocked.
Hi Mike,
Thanks for clarifying and taking the time to help. I will try to use your terminology to explain myself a little better.
When delete buttons are shown I understand that the only buttons that can be clicked are:
- the ion-delete buttons
- AND A TOGGLE TO UNSHOW THE DELETE BUTTONS.
In the first codepen, http://codepen.io/paulking00/pen/ByYbpv I can show the ion-delete buttons with all 3 toggle buttons but I can only unshow the ion-delete buttons with the toggle in the menu.
In the second codepen, http://codepen.io/paulking00/pen/qEYgYz?editors=101 I can show the ion-delete buttons with all 3 toggle buttons, but then I can never unshow the ion-delete buttons.
My question is, what counts as a toggle for the purposes of the click events? Is it only buttons that appear in the header?
Many thanks!
Any thing can be a toggle, as long as it is outside the ion-content.
Aha!!! "outside the ion-content"
Thank you!
I was under the impression that is had to be outside the ion-list
I'll look back over the doco.
Cheers, Paul.