javascript - In firefox, when right-click on a textfield, how to get the start position? -



javascript - In firefox, when right-click on a textfield, how to get the start position? -

my requirement need know value selected in text field when right-click on specific value portion.

e.g. suppose current value in text field "a@a.com, b@b.com, c@c.com", when move mouse on "b@b.com" , right click, programme should know have chosen email address.

i implemented left-click (by checking event.selectionstart), in firefox, right-click not move edit cursor clicked position, wherever right click at, event.selectionstart keeps same value.

any idea? thanks...

ok. in firefox, event.rangeoffset can used.

javascript html firefox dom

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -