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

Dropdown list "Tap" is not working on Blackberry #5792

Closed
ankushgoyal27 opened this issue Mar 10, 2016 · 5 comments
Closed

Dropdown list "Tap" is not working on Blackberry #5792

ankushgoyal27 opened this issue Mar 10, 2016 · 5 comments
Assignees

Comments

@ankushgoyal27
Copy link

Using Ionic framework, dropdown list is not opening on Tap. Dropdown list opens when we Tap, hold and drag.
If we, just use the pure angular framework then dropdown list opens on tap

Is there anything that Ionic is overriding the angular behaviour. If it is overriding could you guys please let me know.

Because of this, I am getting very critical issues.

Thanks.

@mhartington
Copy link
Contributor

Hi there 😄 ! So in order to debug this, we're going to need an example to test. Please provide a codepen that we can load on to our devices and test. Thanks!

@mhartington mhartington added the needs: reply the issue needs a response from the user label Mar 10, 2016
@ankushgoyal27
Copy link
Author

Thanks Mike for reply, Here you go with the example of ionic dropdown.
codepen Ionic

If we implement the dropdown using angular dependencies, then it is working fine.

Thanks,

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Mar 10, 2016
@mhartington
Copy link
Contributor

Are you seeing the same problems on Android or iOS?
I do want to point out that we do not support blackberry, so this could be an isolated issue there.

@mhartington mhartington added the needs: reply the issue needs a response from the user label Mar 11, 2016
@ankushgoyal27
Copy link
Author

In Android and IOS, it is working as expected. Just to "Tap" on dropdown and it opens the list.

This is only a blackberry issue.

As we did some analysis and found if we comment the below line in ionic.js, then it resolves this issue.

But, I am not sure how it will gonna impact the framework. Please advise

Changes

  1. Commented lines: 3026, 3027 and 3028, and added return true
  2. Commented line: 2978
function tapHandleFocus(ele) {
  tapTouchFocusedInput = null;

  var triggerFocusIn = false;

  if (ele.tagName == 'SELECT') {
    // trick to force Android options to show up
    //triggerMouseEvent('mousedown', ele, 0, 0); // 3026
    //ele.focus && ele.focus();
    //triggerFocusIn = true;
    return true;
  } else if (tapActiveElement() === ele) {
    // already is the active element and has focus
    triggerFocusIn = true;

  } else if ((/^(input|textarea)$/i).test(ele.tagName) || ele.isContentEditable) {
    triggerFocusIn = true;
    ele.focus && ele.focus();
    ele.value = ele.value;
    if (tapEnabledTouchEvents) {
      tapTouchFocusedInput = ele;
    }

  } else {
    tapFocusOutActive();
  }

  if (triggerFocusIn) {
    tapActiveElement(ele);
    ionic.trigger('ionic.focusin', {
      target: ele
    }, true);
  }
}


function tapTouchEnd(e) {
  //console.log('touchend ' + Date.now());
  if (tapIgnoreEvent(e)) return;

  tapEnableTouchEvents();
  if (!tapHasPointerMoved(e)) {
    tapClick(e);

    if ((/^(select|option)$/i).test(e.target.tagName)) {
      //e.preventDefault();  // Line no: 2978, commented
    }
  }

  tapLastTouchTarget = e.target;
  tapTouchCancel();
}

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Mar 11, 2016
@jgw96 jgw96 added the list label Mar 11, 2016
@mhartington
Copy link
Contributor

I'd rather not mess with any of that code since it tries to handle things between ios and android.
Which blackberry device is this? Since it's only happening on blackberry, which we don't support, and not on ios or android, I think we can close this.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants