Allow clicking on a copyable text to switch label to input box
Another great idea stolen from github.com. If the user single-clicks
on a label that is marked as copyable we convert the label to a text
box and select everything, so the user only needs to use Ctrl-C to
copy the text onto their clipboard. A keyboard binding converts the
field back to a label after the copy completes, and a focus listener
also does the same if focus is lost on the input box.
This is a nice workaround for browsers which do not have a flash
plugin installed or enabled.
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed