Skip to content

UX improvement: select all text in input on focus #996

@nugged

Description

@nugged

when I press on drop-down triangle I have list and cursor blinking in the input field:
image
And yes, it that field definitely one whole item from the list, so I can't input any more letters but must press backspace, it erases all text, and I start to type new with pretty well-designed typeahead search.
Well.

But what if we will select all text in input on focus, so on any user input it will start a search from scratch, I mean no need to press backspace and just any first alphanumeric character pressed start to search new item?

Or if I just missed that option from manual, please, help/advice.
Or should I make it with a snippet, what should be there for 'focus' event below?
(how to get that $(this).{...somethow_get_to_that_internal_input_field...}.select(); working?)

$('#forminput_tz').selectize();
selectize.on('focus', function() {
    ... what should be here?
    $(this).{...somethow_get_to_that_internal_input_field...}.select(); ?
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions