-
Notifications
You must be signed in to change notification settings - Fork 89
Gotchas
Case in point: calcite-input-number. <input type="number"> used standalone will keep track of and display incomplete values typed into the input. In calcite-input-number, which renders a hidden <input type="number"> element, setting the value of that hidden input directly to an incomplete number value like "-" will not set the hidden input's value property to -, but more importantly, because it is hidden and can't be directly typed into, it will not track that the - character was typed into it, so it will not trigger a validation error when the form it's contained within is submitted.
The following CodePen demonstrates how cancelation affects related mouse events.
Caution
Avoid canceling (preventDefault()) pointer events in components, as doing so can prevent related mouse events from being emitted.
- Monorepo
- Global Config
- Coding Conventions
- Testing Conventions
- Patching Packages
- Deprecation Guidance
- Continuous Integration
- GitHub Secrets
- Troubleshoot Build Errors
- Tips and Tricks
- NPM FAQ
- Issue Verification
- Wiki Conventions
- Styling Conventions
- CSS Transitions
- Restricting User Input
- ItemHidden Property
- What Happens When You Scale Vector-Based Icons
- Internationalization
- Introduction
- Getting Started
- Naming Schema
- Semantic Tokens
- Component Tokens
- Web Platform
- Build
- Documentation
- Testing
- Contributing