mozilla-b2g/gaia — pull request #26213 by jrburke (2014-11-18 05:33:32+00:00)
Title: Bug 1092440 - Email should follow text selection pattern

This pull request sets it up so that no elements are user selectable as a baseline, then selectively enables:

* The input text entries we have. I included "url" just in case we have one later.
* I enabled text selection in the text entries for the signature, and for the email body compose area. I did this to allow easy cut/paste capabilities while composing text in those fields.
* Plain text email bodies in the message_reader are selectable. I chose to use a * selector to allow that structure to change. I originally had a -moz-user-select style on each of the selectors in the CSS for those sub-DOM elements, but it seemed fragile to change later. So I am trading future flexibility for a slower selector. I am fine taking the tradeoff the other way though. Do not see a perf hit at user scale.

I originally tried just selecting `-moz-user-select: none` on the body, hoping other elements would inherit it but that did not seem to work. So I went with the * selectors.

I had a change to add "copy" menu item to the peep bubble contact menu, and dispatched a [ClipboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent.ClipboardEvent) on `document` for a 'copy' with the peep.address, but that did not seem to lead to it showing up as an option for paste text. So I did not include that change here, may need some upgrades to the copy/paste plumbing.

I tested copying rich text HTML from a web page and pasting it in our compose or signature card areas, and luckily the paste is text only, no HTML tags. So woohoo for that, no changes needed there.