Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Collapse all mozilla selections?

    Back for more . . .

    I'm running into a problem with having a bunch of different selected areas in my editable document in mozilla. I can't seem to get them all unselected.

    I can get one or two to unselect but not all of them.

    This happens after I have been using comparePoint in a loop that loops through the whole document.

    I have used collapse on the selection I made but it leaves other text still selected.

    Is there a quick way to unselect all the selections in mozilla?

    Thanks.
    Last edited by iceboxqs; 06-18-2004 at 01:42 AM.

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I would try maybe:

    window.getSelection().removeAllRanges()


  • #3
    New Coder
    Join Date
    May 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Hehe, that did it. Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •