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

ngClick or possibly other click events stops working after directive usage #10

Closed
sqzbx opened this issue Aug 10, 2016 · 3 comments
Closed

Comments

@sqzbx
Copy link

sqzbx commented Aug 10, 2016

Firstly, great directive here. Specifically what I needed... :)
I'm using it to enable drag-scroll with ion-contents that have overflow-scroll="true"
Something like this
<ion-content overflow-scroll="true" drag-scroll>long content here</ion-content>
Inside that ion-content are basically other elements that have ng-click events on them, After clicking and dragging, successive clicks will only trigger the drag and scroll functionality and will render other clicks not working.

@jellekralt
Copy link
Owner

Hi,
Do you have some more information for me? I cant seem to replicate this behaviour, the clicks work just fine. Could you maybe whip up an example?

@sqzbx
Copy link
Author

sqzbx commented Aug 26, 2016

Hi,
For the simplest implementation I have in my app, I have the following html template:

<ion-view>
    <ion-content overflow-scroll="true" drag-scroll="enabled">
        <div class="card" ng-repeat="item in steps track by $index" ng-click="openModal('step', $index)">
            <div class="item">
                <h3>{{item.title}}</h3>
            </div>
        </div>
    </ion-content>
</ion-view>

I am currently using the directive to drag-and-scroll through this list. Each item opens a modal when clicked. The opening of modal only works once, after that I will still be able to drag-and-scroll the list but can't open modals.

I managed to solve this particular issue by removing the

e.preventDefault();
e.stopPropagation();

from the handleMouseDown function.

I tried to recreate the issue in a plunker, but same as you, I can't manage to replicate it. So its probably other things messing up the behavior of click events.

Thanks again for the great directive.

@sqzbx
Copy link
Author

sqzbx commented Sep 9, 2016

I'll close this issue. Since I can't replicate it outside the app I'm working on.

Thanks...

@sqzbx sqzbx closed this as completed Sep 9, 2016
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