[web] Empty Selection/Range object in Opera
For certain reasons, I need to know the index of an empty selection of an html element, I can do this fine in firefox and ie, however, Opera always reports the begin and end index of the selection as 0 if the selection is empty. Does anyone know of a way around this?
Check your call to window.getSelection().rangeCount. It seems Opera denies the existence of empty selections and returns 0 for window.getSelection().rangeCount. My solution: Ditch support for Opera until they support standards for 100%, not 99%.
Quote:Original post by kanzler
Check your call to window.getSelection().rangeCount. It seems Opera denies the existence of empty selections and returns 0 for window.getSelection().rangeCount. My solution: Ditch support for Opera until they support standards for 100%, not 99%.
I might do this, but I'd rather not. Mainly because I use Opera as my primary browser. Any other suggestions?
I was thinking maybe I could find the index of the selection based on the pixel cooridnates of the mouse, but I'm not really sure how to go about implementing it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement