Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25046] iOS: Peek and Pop functionality not working with 6.1.0 G.A and above

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-08-15T22:07:59.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1, Release 6.1.2
Fix Version/sRelease 6.2.0
ComponentsiOS
Labelsn/a
ReporterShuo Liang
AssigneeHans Knöchel
Created2017-08-01T09:26:31.000+0000
Updated2017-08-15T23:17:41.000+0000

Description

Reproduce

1. Run the simple app attached in an alloy project 2. On force touch of "Open Window" button. 3. Another window should be opened. But on force touch of button, peek event is not getting fired.

Note

Same issue with 6.1.0.GA 6.1.1.GA But working well on 6.0.3.GA

Attachments

FileDateSize
index.js2017-08-01T09:26:08.000+00003416
index.tss2017-08-01T09:26:11.000+0000136
index.xml2017-08-01T09:26:14.000+000090
pop.js2017-08-01T09:26:08.000+0000113
pop.tss2017-08-01T09:26:11.000+000022
pop.xml2017-08-01T09:26:14.000+00001482

Comments

  1. Hans Knöchel 2017-08-09

    I am able to reproduce the issue on 6.1.x, simplified test-case:
       if (!Ti.UI.iOS.forceTouchSupported) {
         alert('NOT SUPPORTED!');
       }
       
       var actions = [];
       
       var win = Ti.UI.createWindow({
         backgroundColor: "white"
       });
       
       // The actions to be added to the preview context.
       var action = Ti.UI.iOS.createPreviewAction({
         title: "Directions",
         style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT
       });
       
       var actionCall = Ti.UI.iOS.createPreviewAction({
         title: "Call",
         style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT
       });
       
       action.addEventListener("click", function(e) {
         alert("Title: " + e.title + " / Style: " + e.style + " / Index: " + e.index);
       });
       
       actionCall.addEventListener("click", function(e) {
         alert("Title: " + e.title + " / Style: " + e.style + " / Index: " + e.index);
       });
       
       var actionProfile = Ti.UI.iOS.createPreviewAction({
         title: "Call Profile",
         style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT
       });
       
       actionProfile.addEventListener("click", function(e) {
         alert("Title: " + e.title + " / Style: " + e.style + " / Index: " + e.index);
       });
       
       actions.push(action);
       actions.push(actionCall);
       actions.push(actionProfile);
       
       var pview = Ti.UI.createView({
         height: 100,
         backgroundColor: 'white'
       });
       
       pview.add(Ti.UI.createLabel({
         text: 'Address\n Title',
         color: 'black'
       }));
       
       // Create the preview context
       var context = Ti.UI.iOS.createPreviewContext({
         actions: actions, // Can have both Ti.UI.iOS.PreviewAction + Ti.UI.iOS.PreviewActionGroup
         contentHeight: 100, // When unspecified, we use the available height
         preview: pview
       });
       
       context.addEventListener("peek", function(e) {
         Ti.API.warn('in peek');
       });
       
       context.addEventListener("pop", function(e) {
         Ti.API.warn('in pop');
       });
       
       // Assign the preview context
       var button = Ti.UI.createButton({
         previewContext: context, // Will be ignored on unsupported devices
         title: "Open Window!",
         backgroundColor: "#A6171C",
         width: 200,
         height: 50,
         tintColor: "#fff"
       });
       
       win.add(button);
       win.open();
       
  2. Hans Knöchel 2017-08-09

    The issue was introduced by the fixing the analyser-warnings ([this line](https://github.com/appcelerator/titanium_mobile/commit/46e83b20895f110fbf0b6adcf93edd84968c4ec9#diff-e1073c3ff26a35a5c8da1098e5020788R87)). PR ready later today. Might be worth a 6.1.3!
  3. Hans Knöchel 2017-08-09

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9289 PR (6_2_X): https://github.com/appcelerator/titanium_mobile/pull/9290
  4. Abir Mukherjee 2017-08-15

    Passed FR. Fix found in SDK versions: 6.2.0.v20170815151205 7.0.0.v20170815144954

JSON Source