Skip to content

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

Closed

Description

@ankushgoyal27

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.

Activity

  1. mhartington commented on Mar 10, 2016

    @mhartington
    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!

  2. added
    needs: reply
    on Mar 10, 2016
  3. ankushgoyal27 commented on Mar 10, 2016

    @ankushgoyal27
    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,

  4. removed
    needs: reply
    on Mar 10, 2016
  5. mhartington commented on Mar 11, 2016

    @mhartington
    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.

  6. added
    needs: reply
    on Mar 11, 2016
  7. ankushgoyal27 commented on Mar 11, 2016

    @ankushgoyal27
    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();
    }
    
    
  8. removed
    needs: reply
    on Mar 11, 2016
  9. mhartington commented on Mar 11, 2016

    @mhartington
    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.

  10. locked and limited conversation to collaborators on Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions