Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25590] iOS: Webview not working inside the container view as expected.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDone
Resolution Date2018-04-19T11:19:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, iphone
Reportershumne
AssigneeVijay Singh
Created2017-12-07T07:33:23.000+0000
Updated2018-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

FileDateSize
WebViewIssue.zip2017-12-07T07:25:27.000+00009412760

Comments

  1. Vijay Singh 2017-12-15

    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.
       <Alloy>
           <Window class="container">
               <View id="containerView" onClick="clickContainerView">
                   <WebView id="webViewIssue" willHandleTouches="false" />
               </View>
           </Window>
       </Alloy>
       
  2. Shak Hossain 2018-01-24

    [~shumne] - have you looked into the recommendations posted? Please let us know if you need further question on this.
  3. Hans Knöchel 2018-04-19

    [~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!
  4. Eric Merriman 2018-08-06

    Closed as completed. If this is in error, please reopen.

JSON Source