[TIMOB-25590] iOS: Webview not working inside the container view as expected.
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-04-19T11:19:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | ios, iphone |
Reporter | shumne |
Assignee | Vijay Singh |
Created | 2017-12-07T07:33:23.000+0000 |
Updated | 2018-08-06T17:34:47.000+0000 |
Description
1. Created the alloy titanium mobile project.
2. Created a view in window on index.
3. Added the webview inside the View.
4. View has onClick event.
5. Loading the webview with Google Url.
6. Not able to select any kind of textfield.
7. Please check the below project in attachment.
Following the configuration of my machine:
1. Ti SDK 6.3.0
2. Appc Studio 4.10.0
3. Node.js 4.4.6
4. CLI 5.0.14
5. Xcode 9.0.1
6. iOS SDK 11.0
Let me know if you need more details.
Thanks :)
Attachments
Hi, In doc http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView, a note is mentioned for above behavior- "iOS Platform Implementation Notes On the iOS platform, the native web view handles scrolling and other related touch events internally. If you add event listeners on the web view or its parent views for any of the standard touch events (touchstart, click, and so on), these events do not reach the native web view, and the user will not be able to scroll, zoom, click on links, and so on. To prevent this default behavior, set willHandleTouches to false. In other words, you can have either Titanium-style events against the web view instance, or internal JavaScript events in the DOM, but not both." If you add willHandleTouches=false in index.xml as below, it will allow to select textfield on webview.
[~shumne] - have you looked into the recommendations posted? Please let us know if you need further question on this.
[~shumne] Can we resolve this ticket? *EDIT*: I just validated the fix on the attached project and it works fine, so I assume we are good here. Thx!
Closed as completed. If this is in error, please reopen.