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

Image click passes click event to list item #40

Closed
uzumakinaruto123 opened this issue Mar 27, 2017 · 4 comments
Closed

Image click passes click event to list item #40

uzumakinaruto123 opened this issue Mar 27, 2017 · 4 comments

Comments

@uzumakinaruto123
Copy link

Thanks for the module. nice one.
Only one issue , on clicking image it passes the event to list item and app navigates. event should be prevented.

@Riron
Copy link
Owner

Riron commented Mar 27, 2017

Thanks for the report ! I will give it a look and release a fix soon.

@Riron
Copy link
Owner

Riron commented Mar 31, 2017

Hi,
I couldn't quite reproduce the problem. Could you provide a small code sample of what you are doing ?
I suppose the images are list items, and clicking on the item should so some sort of actions but clicking on the image itself should not trigger this action ?
A small piece of your html would definitely help understand better the problem.
Thanks 👍

@uzumakinaruto123
Copy link
Author

Here is the code , a normal list with list item having thumbnail on left similar to one in ionic docs :-

<ion-list>
    <ion-item class="listItem" *ngFor="let item of d.items | search:d.searchvalue" (click)="openItem(item)">
      <ion-thumbnail item-left>
        <img src="{{item.resimage}}" imageViewer src-fallback="{{ (item.Nid % 2 == 0)? 'assets/img/default1.jpg':'assets/img/default2.jpg'}}">
      </ion-thumbnail>
      <h2 [innerHTML]="item.Title"></h2>
      <p [innerHTML]="item.Description"></p>
      <p>Discount : {{item.Discount}}%</p>
    </ion-item>
  </ion-list>

Here everything works , except when that thumbnail is clicked , it also triggers (click)="openItem(item)"

In which , page is navigated to item detail page. Thanks

@Riron Riron closed this as completed in 151ebf0 Mar 31, 2017
@uzumakinaruto123
Copy link
Author

wow that was fast ! Thanks :) will update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants