Topic: Mdb-select fails to open when clicking on page within 200ms before clicking the select
Jonathan De Badrihaye free asked 6 years ago
When running Cypress UI tests on our application, we are having issues with the mdb-select component.
When clicking somewhere on the page and then clicking on the select within 200ms, we noticed that the select opens and quickly seems to close again (although the arrow icon remains as if the select were open).
We have noticed that this behaviour is caused by a 200ms timeout statement in the mdbootstrap code..
Is there a particular reason for this behaviour amd/or can this be resolved in one of the future releases if this seems to be unwanted behaviour? Currently we are using this code to override the default behaviour.
function closeDropdown(select) { return (focus) => { if (focus === void 0) { focus = false; } var /** @type {?} */ container = select.el.nativeElement.lastElementChild.classList; select.renderer.removeStyle(select.el.nativeElement, 'z-index'); container.remove('fadeInSelect'); if (select.isOpen) { select.renderer.setStyle(select.selectionSpan.nativeElement.children[0].lastChild, 'visibility', 'hidden'); // tslint:disable-next-line:max-line-length select.renderer.setStyle(select.selectionSpan.nativeElement.children[0].children[select.selectionSpan.nativeElement.children[0].children.length - 2], 'visibility', 'visible'); select.clearFilterInput(); select.isOpen = false; if (focus) { select.focus(); } select.closed.emit(select); } }; }
Add comment
Arkadiusz Idzikowski staff answered 6 years ago
Dear Jonathan,
Thank you for reporting this problem, we will take a closer look at it.
Regards,
Arek
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Answered
Specification of the issue
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.2
- Device: Desktop
- Browser: Chrome Version 69.0.3497.8
- OS: Ubuntu 18.04.1 LTS
- Provided sample code: No
- Provided link: No