javascript - How can I get cursor position in a textbox as a pixel value? -


i'm trying that:enter image description here

when use enter "#" in textbox, colorpicker div must opened in bottom of cursor position. can order of cursor element.selectionstart it's not reliable way that. must pixel value. suggestion?

if you're sure textfield never scroll, can replicate font , box sizing of textfield in div positioned out of view, , measure size of span same contents textfield.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -