primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Dropdown auto close on tablet Android

Open jorgekg opened this issue 7 years ago • 8 comments

** I'm submitting to ... ** (check one with "x") (I.e. [X] bug report => Search github for a similar issue or PR before submitting [] feature request => Please check if request is not already on the roadmap https://github.com/primefaces/primeng/wiki/Roadmap [] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35 (I.e.

** Plunkr Case (Bug Reports) ** Please show your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewedd in detail and assisted.

http://next.plnkr.co/edit/DqMzyAm1zoeSXmzk

** Current behavior ** When open p-dropdown with filter on tablet, it's automatically closing. we can see the link below https://youtu.be/8Scu7yctTA0

** Expected behavior ** Not auto close p-dropdown when open on tablet.

** Minimal reproduction of the problem with instructions ** Implements any p-dropdown with a filter and execute on tablet. https://youtu.be/8Scu7yctTA0 http://next.plnkr.co/edit/DqMzyAm1zoeSXmzk

  • ** Angular version: ** 7.X

  • ** PrimeNG version: ** 7.X

  • ** Browser: ** [Chrome XX | Firefox XX]  

  • ** Language: ** [all | TypeScript 3.X | ES6 / 7 | ES5]

jorgekg avatar Feb 18 '19 17:02 jorgekg

+1

francovegini avatar Feb 19 '19 12:02 francovegini

+1

marlonrp avatar Feb 19 '19 13:02 marlonrp

Duplicate of https://github.com/primefaces/primeng/issues/7125

JacobSiegle avatar Feb 19 '19 17:02 JacobSiegle

I do have this issue.. primeng dropdown filter not working in android devices. I found some temporary quick fix.

node_modules/primeng/components/dropdown/dropdown.js

I have changed directly in node_modules as i need quick fix

Dropdown.prototype.onMouseclick = function (event) {
            .........
            .........
              // setTimeout(function () {
                 // if (_this.filterViewChild != undefined) {
                 //     _this.filterViewChild.nativeElement.focus();
                 // }
             // }, 200);
}

I have hidden this and it worked 👍

after that search not working then i have made this change

    Dropdown.prototype.onOverlayAnimationStart = function (event) {
                 ..............
                 ..............
                // this.bindDocumentResizeListener();
}

divyachandana avatar Feb 20 '19 05:02 divyachandana

The issue is caused by hiding dropdown on window.resize event when there's some input (ex. for filtering) that is getting focus on control show. On mobile (Android) devices the soft keyboard is popping out and that rises window.resize event. Solution would be to check if we are on mobile device and react on 'orientationchange' event instead of 'resize' as it's not possible to resize window on mobiles/tablets (at least on most of them).

I've created an Angular directive with temporary workaround (works on devices I have available to test) and example usage - the code is here on Stackblitz, and here's direct link to the example app Be aware that it blocks the 'resize' event on mobile devices (but allows on 'resize' event on 'orientationchange'). If you have better ideas/workarounds - please share.

BlackfootPL avatar Feb 23 '19 20:02 BlackfootPL

7030

cagataycivici avatar Mar 04 '19 09:03 cagataycivici

The same issue still exists on mobile Android devices when selecting the input box on a table filter:

https://www.primefaces.org/primeng/showcase/#/table/filter

I believe this requires the same fix.

max-x-1000000 avatar Apr 26 '21 11:04 max-x-1000000

O mesmo problema ainda existe em dispositivos móveis Android ao selecionar a caixa de entrada em um filtro de tabela:

https://www.primefaces.org/primeng/showcase/#/table/filter

Eu acredito que isso requer a mesma correção.

i have the same problem, and with primeng 13.3.3, does anyone have a solution?

thiagolopes-dev avatar May 18 '22 19:05 thiagolopes-dev