Text selection in editor fields

Text selection in editor fields

fabianrottfabianrott Posts: 30Questions: 1Answers: 0

Hi!
I observed some strange behaviour with activated inline editing.
To reproduce it, got to https://editor.datatables.net/examples/inline-editing/simple.html
Here, edit a random cell and before exiting inline edit, select some part of that text. Now go to some other field in the same column (doesn't matter if you save the changes or not) and the content there will be selected at the same position. Same applies for the cursor position, by the way.
This even goes beyond inline edit: If you do this in the first column, the same letters will be selected in the main editor window as well.
In my own project, this behaviour has appeared in other fields in the editor window as well. It looks strange, since the selection is made even if the field is not in focus.

This could lead to some confusion and annoyance for the user, particularly because it does not only affect the row where the text was selected.

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin

    and the content there will be selected at the same position. Same applies for the cursor position

    I'm afraid I've not been able to reproduce this behaviour. Does it happy for you in all browsers, or just a particular one?

    Regards,
    Allan

  • fabianrottfabianrott Posts: 30Questions: 1Answers: 0

    Hi Allan!
    Ah, interesting...
    I'm working with Firefox under MacOS X El Capitan. Apparently, Chrome and Safari don't show this behaviour.

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin

    Thanks for the confirmation - I can see that in Firefox as well.

    Its very odd! I'll check the Firefox bug database. Personally I prefer the Chrome / Safari / IE way of doing it, but perhaps they've done that intentionally...

    Allan

This discussion has been closed.