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
Post a Comment