Comments (5)
Hi @christoph-schlumpf , could you please add the "Steps to Reproduce"?
from pattern-library.
I have added „Steps to reproduce“. I suspect this issue always happens in a React app. If you have an example where this issue does not happen inside React we would be glad to have a look at it.
Best regards,
Christoph
from pattern-library.
@christoph-schlumpf This is a consequence of using React with input components in controlled mode. Since that's one of the bad ideas of React, it's exceedingly hard if not impossible to override browser-native stateful HTML elements in all aspects. The error message says that for whatever reason a type-email input cannot set the selectionrange, i.e. where the cursor is. We added setting the selectionrange for another 'bug', also controlled mode. Of course we could fix this new issue by not setting selectionrange when input of type email is used, but the better approach - which we would ask to try - is to just use uncontrolled components, while still achieving your desired UX. Please report back here after you tried that systematic workaround.
from pattern-library.
Hi @markus-walther ,
We will have a look at your proposal to use the component in Uncontrolled mode. We will inform you about our results.
Best regards
PS: Please keep this issue open untill we can confirm that the proposed solution is OK in our UX.
from pattern-library.
Hi @markus-walther,
I can confirm that as an uncontrolled component the error does not happen. We were able to use an uncontrolled input-text in our UX. Thank you!
As many React applications use controlled components I would suggest that you nevertheless fix the issue. Additionally it would be very helpful to mention in the documentation on https://axa-ch-webhub-cloud.github.io/plib-feature/develop/?path=/story/components-input-text--input-text -> "Usage" that the component should only be used as an uncontrolled component in React because there are issues when it is used as a controlled component.
Best regards,
Christoph
from pattern-library.
Related Issues (20)
- Datepicker dropdown let's you choose the default value of "Choose month" and "Choose year" HOT 3
- Improve the release script HOT 2
- axa-modal: allow height configurable
- axa-modal: allow content scrollable
- Update Scope
- dropdown handleAutosuggest is not firing change event
- Continue Datepicker tests migration
- Documentation for new scope missing
- AXA Sortable Table HOT 1
- Unhandled Rejection in datepicker using vitest with react testing library
- Modify background color of footer
- axa-fieldset: wrong breakpoint after migration HOT 1
- AXA Radio Button has weird background behind text when using combination of "checked" and "button" attribute
- Fix Footer Breakpoints (mobile)
- Update package.json version of released components
- Top Content Bar: Typescript definition is missing onClose() callback
- axa-fieldset css neagtive margin question
- axa-footer broken when versioned: re-slotting of nested children refers to unversioned component name
- Input phone: Falsche Telefonvorwahl für Liechtenstein HOT 3
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 pattern-library.