links are not clickable when webView inside tableView
I have webView inside tableView. Why links in webView are not clickable?
I removed the event handler click on tableRow, but it did not help.
I use titanium SDK 1.4.1.1
4 Answers
-
Do you have any listeners on that webview? If so, remove them.
You can also try adding
touchEnabled:true
-
When I click on WebView link then illuminated the entire section of the TableView
-
Pasha,
This is due to the touch event being passed to the table as apposed to the webview. When you click on a link within a webview it will use the already existing webview to display the result of clicking on the link. If you intend to load a page this would obviously try and load the page within the limited space you have set for the tableViewRow. That's if you can get the link to accept touch events and not the row itself.
Could you please post your code.
http://www.srcnix.com
-
var webView = Ti.UI.createWebView({ html: new_summary, left: 10, top: 10, bottom: 10, height: "auto", width: 280, touchEnabled:true }); var detailsSection = Ti.UI.createTableViewSection(); var detailsRow = Ti.UI.createTableViewRow({ height: "auto", className: "details_summary", backgroundColor: "#FFF", action: null }); detailsRow.add(webView); detailsSection.add(detailsRow); data.push(detailsSection); ... mainView = Ti.UI.createTableView({ data: data, style: Titanium.UI.iPhone.TableViewStyle.GROUPED }); mainView.addEventListener("click", function(event) { if (event.rowData.action) { event.rowData.action(); } }); currentWindow.add(mainView);