Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Prevent marking in WebView

Prevent marking in WebView

Scheduled Pinned Locked Moved Qt WebKit
webview
4 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    McLion
    wrote on 2 Oct 2015, 13:36 last edited by McLion 10 Feb 2015, 14:08
    #1

    Hi

    Is there a way to prevent marking/selection in a WebView?
    I mean, if the mouse/touch is pressed and hold and then moved it should not mark things moved over until released.

    Thanks
    McL

    M 1 Reply Last reply 20 Nov 2015, 06:41
    0
    • M Offline
      M Offline
      McLion
      wrote on 5 Oct 2015, 10:00 last edited by
      #2

      Hmmm, no response ... does that mean that this not possible ?!?

      1 Reply Last reply
      0
      • M McLion
        2 Oct 2015, 13:36

        Hi

        Is there a way to prevent marking/selection in a WebView?
        I mean, if the mouse/touch is pressed and hold and then moved it should not mark things moved over until released.

        Thanks
        McL

        M Offline
        M Offline
        maximo
        wrote on 20 Nov 2015, 06:41 last edited by
        #3

        @McLion This is best handled in the jQuery. It sounds like on certain elements you want to prevent the selection event from occurring.

        http://stackoverflow.com/search?q=jquery+prevent+text+selection

        So, create a class, and then capture the select event on that class, then deny it with e.preventDefault() followed by return false. I'm not certain, but this might involve dragstart and dragend events, as well.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          McLion
          wrote on 20 Nov 2015, 08:46 last edited by
          #4

          @maximo
          Thanks for the input. I'll look into that.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved