Javascript library which finds the top and left coordinates of the caret in a or <input type="text">, in pixels. Useful for textarea<br/> autocompletes like GitHub or Twitter, or for single-line autocompletes like<br/> the name drop-down in Twitter or Facebook's search or the company dropdown<br/> on Google Finance.<br/> .<br/> Features include:<br/> * supports <textarea>s and <input type="text"> elements<br/> * pixel precision with any combination of paddings, margins, borders,<br/> heights vs. line-heights etc.<br/> * keyboard, mouse support and touch support<br/> * no dependencies whatsoever<br/> * browser compatibility: Chrome, Safari, Firefox, Opera, IE9+<br/> * supports any font family and size, as well as text-transforms<br/> * not confused by horizontal or vertical scrollbars in the textarea<br/> * supports hard returns, tabs (except on IE) and consecutive spaces in<br/> the text<br/> * correct position on lines longer than the columns in the text area<br/> * no problem getting the correct position when the input text is scrolled<br/> (i.e. the first visible character is no longer the first in the text)<br/> * no "ghost" position in the empty space at the end of a line when wrapping<br/> long words in a <textarea><br/> * RTL (right-to-left) support</p> </div> <div class="column is-one-quarter-desktop search"> <form class="form-inline" action="/search_pkg" method="GET"> <p class="control has-icons-left"> <input id="term" name="term" class="input is-rounded" type="text" placeholder="Find another package..."> <span class="icon is-left"> <i class="fas fa-search"></i> </span> </p> </form> </div> </div> <b>Priority:</b> optional <br/> <b>Section:</b> javascript <br/> <b>Suites:</b> <span class="badge badge-pill badge-info">crimson</span> <span class="badge badge-pill badge-info">dawn</span> <span class="badge badge-pill badge-info">landing</span> <br/> <b>Maintainer:</b> Debian Javascript Maintainers <pkg-javascript-devel [꩜] lists.alioth.debian.org> <br/> <br/> <a class="button" href="https://github.com/component/textarea-caret-position" role="button">Homepage</a> <a class="button" href="/package/src/pureos/landing/textarea-caret.js" role="button">Source Package</a> <br/> <br/> <p> <b>Installed Size</b>: 20.5 kB <br/> <b>Architectures</b>: <span class="badge badge-pill badge-secondary"><i class="fas fa-cog"></i> all</span> </p> <br/> <h3>Versions</h3> <a class="border-box" href="http://repo.pureos.net/pureos/pool/main/t/textarea-caret.js/libjs-textarea-caret_3.0.2-2_all.deb">3.0.2-2 <span class="badge badge-pill badge-secondary"><i class="fas fa-cog"></i> all</span></a> </div> </div> </div> <!-- Footer section --> <footer class="footer"> <div class="section-legal has-text-centered"> <a href="https://puri.sm/" class="brand"> <img src="/static/img/brand.svg" alt="Purism"> </a> <p> 3D renders are artist renderings, for illustration purposes. Images and specifications are subject to change depending on manufacturing requirements. </p> <p> Unless otherwise noted, content created by the Purism team on this website are copyleft with a CC-by-SA 4.0 license. Other content on this page is subjected to the licenses of the respective upstream projects or packagers. </p> </div> </footer> <!-- Menu script --> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', () => { // Get all "navbar-burger" elements const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); // Check if there are any navbar burgers if ($navbarBurgers.length > 0) { // Add a click event on each of them $navbarBurgers.forEach(el => { el.addEventListener('click', () => { // Get the target from the "data-target" attribute const target = el.dataset.target; const $target = document.getElementById(target); // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu" el.classList.toggle('is-active'); $target.classList.toggle('is-active'); }); }); } }); </script> <script src="/static/js/jquery/jquery.slim.min.js"></script> </body> </html>