removeSelections
In some browsers selections inside text inputs are not removable.
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
createSelection
Use this button to test different kinds of created selections.
The button should rotate through a list of "text-only selection",
"selection containing text input",
a "selection inside inputs" and
"selection including all content".
The selected text should be logged to the dev console.
On mobile/iOS devices creation of selection ranges might only be allowed in inputs
(or, in some cases, you'll get get the range's text, but it is not visible).
disableSelection & enableSelection
Use this button to disable and re-enable text selectability for the content above.
Depending on your browser this setting may or may not hold true for selections created with
createSelection above. Some browsers like IE11 block everything, while others like Firefox block
nothing, so don't rely on this effect in your implementations!
Depending on your browser, selections in text inputs might not be suppressible (in Chrome for example).
obfuscatePrivateMailToLink
This section should contain three mailto links with unparsable email notations to protect the
recipients from spam.
The first one should contain a preset text, while the second contains no text initially,
but receives the text automatically on init, by inserting the mail address.
(The second one is, of course, weaker against bots.)
The third variant demonstrates how to render the address parts directly on an element,
without compromising the idea of this function.
Write a mail to this person or this person and maybe even to this person.
obfuscatePrivateTelLink
This section should contain three tel links with unparsable phone number notations to protect
the recipients from spam.
The first one should contain a preset text, while the second contains no text initially,
but receives the text automatically on init, by inserting the phone number.
(The second one is, of course, weaker against bots.)
The third variant demonstrates how to render the number parts directly on an element,
without compromising the idea of this function.
Let's call this person or this person 555-123-456 and maybe even this person.
setTappedState & setupAutoTappedStates
All buttons and links on this page (including other functions, but not navigation) should shortly show a green caret, when clicked upon (regardless if pointer click or touch). This includes both elements below. The second element is neither button nor link, but should also show a (slightly longer lasting) caret, when tapped.
tap me as well