2 Replies Latest reply on Oct 9, 2009 4:53 PM by Konrad.Gmurek

    Disable HTML Text Selection

    King Wardrop
      Is this at all possible? I want to disable the ability for users to select text in certain elements of my HTML AIR Application. I want to keep things like buttons and text links click-able though, so overlaying something like a transparent PNG wouldn't work too well.

      Thanks
        • 1. Re: Disable HTML Text Selection
          sk12380

          Does anyone found a solution to this?

          I am facing the same problem.

          I have disabled contextmenu, but after user selects a text, on right-click "copy" menu is visible.

           

          Please help

          • 2. Re: Disable HTML Text Selection
            Konrad.Gmurek

            I was looking for a solution to the same problem and found only this thread.

             

            After a few tests and researches I've found how to do this and it seems to be fairly easy.

             

            To avoid selecting text an element should have css attribute "-webkit-user-select" set to "none" (this is WebKit's equivalent for css3 user-select). The only thing left to do is to set cursor's shape to "default" or "pointer".

             

            Example:

            html {

                 -webkit-user-select: none;

                 cursor: default;

            }