RocketCommunicationsInc / astro

Astro UXDS is a collection of guidelines, patterns and components for designing space-based user interface applications.
https://astrouxds.com
Other
113 stars 25 forks source link

Cursor appears to be inside input, when it is technically not. #1340

Closed danielwlemmon closed 1 month ago

danielwlemmon commented 1 month ago

Describe the bug A clear and concise description of what the bug is. When a user clicks on closer to the edge of an input a cursor is placed just outside of the actual input element (at the span?) making it look like the user can enter text, but not characters show. input cursor

To Reproduce Steps to reproduce the behavior:

  1. Click on close to the beginning or end of an input and try to type.
  2. See screen grab above.

Current behavior A clear and concise description of what is currently happening. A rux-input becomes something like this at render

I suggest for the span, onFocus redirects the focus to the input.

Expected behavior A clear and concise description of what you expected to happen. A user should be able to click within the visual border of the input and begin to type Screenshots If applicable, add screenshots to help explain your problem.

CodeSandbox If applicable, please provide a CodeSandbox or other online code editor tool link that contains an example of the bug. in addition to the gif above can't input text with cursor here here: image can input text with cursor here image

Environment (please complete the following information):

Chrome Version 128.0.6613.138 (Official Build) (64-bit) issue present here: https://astro-components.netlify.app/?path=/docs/forms-input--invalid and in our angular app

Additional context Add any other context about the problem here.

kiley-mitti commented 1 month ago

Hi @danielwlemmon thank you for bringing this to our attention! I think I understand what is happening here, but can you confirm something for me? Is the 'Navigate pages with a text cursor' setting enabled in Chrome? To find out, in Chrome go to Settings > Accessibility and it should be the 4th option down. (Just want to make sure that I'm recreating the issue properly.) Thanks!

danielwlemmon commented 1 month ago

yes, it is enabled image

kiley-mitti commented 1 month ago

Hi @danielwlemmon we've diagnosed the problem and put in a fix for next release. If you need a fix immmediately try adding this css to your project:

rux-input::part(input-field){
user-select: none;
}

rux-input::part(input){
user-select: auto;
}

This should remove the cursor from the spaces around the input while not effecting the input itself.

Thanks again for bringing the issue to us!

danielwlemmon commented 1 month ago

Thanks a bunch!