Carusd Ray
Carusd Ray

Reputation: 1033

How can I detect an onclick event of the whole body element in uiwebview of iOS?

The html page goes like this: <body onclick="doSomething();">...</body>

It works fine in chrome or firefox, yet no response in UIWebView of iOS.Is it banned by Apple or something? Or if there any way to work around it?

Upvotes: 2

Views: 2226

Answers (1)

eternity
eternity

Reputation: 483

Try this:

<body ontouchend="doSomething();">

Reference:
[1] Event handling documentation.
[2] Does UIGestureRecognizer work on a UIWebView?

Upvotes: 5

Related Questions