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

ngf-select and ng-click Don't work together on iphone #1659

Closed
case12 opened this issue Aug 18, 2016 · 10 comments
Closed

ngf-select and ng-click Don't work together on iphone #1659

case12 opened this issue Aug 18, 2016 · 10 comments

Comments

@case12
Copy link

case12 commented Aug 18, 2016

On iphone when I tap the element that contains the ng-file-upload directive, I get the system dialog to either take a picture or choose from library, but ng-click never gets processed.

On mac when I click the element, I get the system dialog to choose a picture, and ng-click does get processed.

  button.upload(
      accept="image/*"  
      ng-if="uploadImages.enabled"
      ng-click="onUploadClick()"
      ng-class="{'post-picture-button': postPicture.show}"
      ng-model="uploadOverlay.file"
      ngf-pattern="image/*"
      ngf-select="uploadFile($file)"
      ngf-resize="getUploadResizeOptions()"
    )

Any alternatives I can use? Known issue?

@danialfarid
Copy link
Owner

Why do you need ng-click on the upload button?

@case12
Copy link
Author

case12 commented Aug 23, 2016

Using analytics to know when the user pressed that button.

@danialfarid
Copy link
Owner

You can use ngf-change or ngf-before-model-change to handle that case.

@case12
Copy link
Author

case12 commented Aug 23, 2016

That works if they change the model. Not if they cancel.

@danialfarid
Copy link
Owner

Would it make a difference if you use input type file?

@case12
Copy link
Author

case12 commented Aug 24, 2016

Doesn't make a difference. I guess this is hapepning because when ios brings up it's system menu it pauses the javascript events in my website?

@danialfarid
Copy link
Owner

Fixed at 12.2.5

@case12
Copy link
Author

case12 commented Aug 26, 2016

Thanks!

@shanthakumarf22
Copy link

@danialfarid : still have same issue. 12.2.5/12. any idea?

@pns2050
Copy link

pns2050 commented Feb 17, 2017

Had the same issue on Microsoft Edge

Used this dirty trick to make it work

onclick=angular.element(document.getElementById('elementId')).scope().myfunction();

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

4 participants