Comments (6)
The issue is that select emits blur when a dropdown receives focus. Not sure if this can be prevented, I'll have a look
from aurelia-mdc-web.
If I move the blur emit this.emit('blur', {}, true);
from MdcSelect.handleBlur
to MdcSelect.handleMenuClosed
then it works as expected.
from aurelia-mdc-web.
If you do that then just tabbing through the select will not validate it.
from aurelia-mdc-web.
I can do
handleBlur() {
this.foundation?.handleBlur();
if (!this.root.classList.contains(cssClasses.ACTIVATED)) {
this.emit('blur', {}, true);
}
}
This will prevent validation when the menu is open. But if a user tabs out of this open menu the control will not be validated since the select itself is not getting the focus back. This can be solved, as you suggested, by emitting blur
on menu close, but, if the menu was closed by clicking on the select itself it will trigger validation even though focus is "conceptually" is still on the select. What are your thoughts?
from aurelia-mdc-web.
Ok, I think I got it
from aurelia-mdc-web.
Nice!
from aurelia-mdc-web.
Related Issues (20)
- Lookup resets value when hidden/shown with 'if.bind'
- Error in MDCDataTable in @aurelia-mdc-web/[email protected] HOT 7
- Deprecation Warning (Non-Urgent)
- [question] How to use Snackbars? HOT 3
- A question on theme support HOT 4
- Font size of list items of drawer not correct HOT 1
- mdc-switch style missing HOT 2
- mdc-switch: Label not clickable anymore
- [bug] - list item trailing links are not clickable HOT 2
- Development guide HOT 4
- Data table navigation and sorting issues HOT 1
- Slider crashes when max and min are changing
- [Bug v2] Expandable styling incorrect HOT 1
- How to listen for mdc-switch "change" event? HOT 2
- List item checkboxes not checkable HOT 1
- mdc-segmented-button single doesn't work on Apple browsers HOT 2
- mdc-list-item non-interactive doesn't seem to work HOT 1
- hosting for au2 docs is dead HOT 2
- documentation down HOT 3
- Error: Cannot read properties of null (reading '$au') -> in dialog via service... v2 branch HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aurelia-mdc-web.