Adjusts text based on #313

This commit is contained in:
Zeno Rocha 2016-09-21 10:38:09 -07:00
parent c6a1d8a45c
commit cc5280f0a7
No known key found for this signature in database
GPG Key ID: 7BEB4BBA4108C63F

View File

@ -180,7 +180,7 @@ clipboard.destroy();</code></pre>
<h1 id="browser-support">Browser Support</h1> <h1 id="browser-support">Browser Support</h1>
<p>This library relies on both <a href="https://developer.mozilla.org/en-US/docs/Web/API/Selection">Selection</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand">execCommand</a> APIs. The second one is supported in the following browsers.</p> <p>This library relies on both <a href="https://developer.mozilla.org/en-US/docs/Web/API/Selection">Selection</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand">execCommand</a> APIs. The first one is <a href="http://caniuse.com/#search=selection">supported by all browsers</a> while the second one is supported in the following browsers.</p>
<ul class="support"> <ul class="support">
<li> <li>
@ -200,15 +200,11 @@ clipboard.destroy();</code></pre>
</li> </li>
<li> <li>
<img src="assets/images/safari.png" width="64" height="64" alt="Safari logo"> <img src="assets/images/safari.png" width="64" height="64" alt="Safari logo">
<p>Safari 10</p> <p>Safari 10+</p>
</li> </li>
</ul> </ul>
<p>Although copy/cut operations with <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand">execCommand</a> aren't supported on Safari < 10 or Safari Mobile on iOS < 10, it gracefully degrades because <a href="https://developer.mozilla.org/en-US/docs/Web/API/Selection">Selection</a> is supported.</p> <p>The good news is that clipboard.js gracefully degrades if you need to support older browsers. All you have to do is show a tooltip saying <code>Copied!</code> when <code>success</code> event is called and <code>Press Ctrl+C to copy</code> when <code>error</code> event is called because the text is already selected.</p>
<p>That means you can show a tooltip saying <code>Copied!</code> when <code>success</code> event is called and <code>Press Ctrl+C to copy</code> when <code>error</code> event is called because the text is already selected.</p>
<p>For a live demonstration, open this site on Safari < 10 or Safari Mobile on iOS < 10.</p>
</main> </main>
<footer class="footer gradient text-center"> <footer class="footer gradient text-center">