iPadOS touch callout CSS does not prevent link from being draggable

When writing web based apps that run in WKWebView we want to write accessible markup and use anchor tags for links. When doing this on iPadOS, if you long press on a link, the element becomes draggable and exposes the URL. As far as I am aware there is no way to disable this.

I'd consider this bad UX, the dragging in Safari is useful for opening up a new window, but in the WKWebView this is not possible and, by design, we do not want this to be an option.

I was hoping that setting "-webkit-touch-callout: none" on the element would disable this and I think it should. This is the behaviour on iOS, can we get the same on iPadOS?
Answered by HazzMan2409 in 651774022
I finally realized that this can be solved with CSS by styling anchors with both of the following properties:
  • -webkit-touch-callout: none;

  • -webkit-user-drag: none;

Accepted Answer
I finally realized that this can be solved with CSS by styling anchors with both of the following properties:
  • -webkit-touch-callout: none;

  • -webkit-user-drag: none;

iPadOS touch callout CSS does not prevent link from being draggable
 
 
Q