urlcharacterdouble-click

Which characters will break a double click highlight


I am creating an online picture storage system that renames images using a 7 character alphanumeric code. These codes are then used in URLs. I would like to be able to double-click on these codes and copy them from a URL within Chrome's URL bar. I am finding that certain characters (- and ~, to name a few) cause double-click to only highlight part of the code.

Is there a list of characters that double-click will not include in its grouping?

Is this an OS or browser specific list?

I would like for my system to use the greatest variety of (URL safe) characters, while still allowing double click to work.


Solution

  • EDIT: There now seems to be consistency between browsers. All the browsers I tried treat - as a separator ("unsafe") while _ is treated as just another character in the grouping ("safe").

    This is entirely browser specific. In IE, _ is "unsafe", while - is "safe". In Chrome, _ is "safe", - is "unsafe". In firefox both are "unsafe". I don't think browsers have any documentation on this. For open-source browsers you can look at the source to see which are safe. I'd only use alphanumeric characters to be sure.