[TIMOB-15205] iOS7: Value not changed at touchEnd event of Switch
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2015-12-17T02:45:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 19, 2013 Sprint 19 API, Release 3.1.3, Release 3.2.0 |
Components | iOS |
Labels | ios7, ipass1 |
Reporter | nicolomonili |
Assignee | Angel Petkov |
Created | 2013-09-13T15:28:24.000+0000 |
Updated | 2017-03-29T22:36:05.000+0000 |
Description
The "change" event of the switch on iOS 7 with SDK 3.1.3 (and Apple iOS 7 SDK) behaves differently than the previous SDK (for example with the 3.0.2 SDK and Apple iOS 6 SDK)
basically if you run the movement shown in the video attached, the "change" event is invoked, although actually at the "touchEnd" of the finger on the switch the switch has not really changed the value.
Attachments
[~vduggal], thoughts?
I saw that you changed the title of the ticket in "Value not changed at touchEnd event of Switch", but in reality that's not the problem the fact is that (with the iOS 7 SDK) if I continue to change the value of the switch (never release the finger) the event change is called. but it should not be so! the event of change should only be called "at the end of the movement on the switch" ("touchEnd finger say")
ok, I made these two videos to help you understand the problem first video made with the SDK 3.1.3.v20130908095038 of titanium, Apple iOS 7 SDK , simulator iOS 7 (incorrect working) second video made with the SDK 3.1.3.v20130908095038 of titanium, Apple iOS 7 SDK , simulator iOS 6.1(correct working) (video added to Attachments)
When apple says change we fire change. We don't actually track touches for sliders, switches and the like. Not our bug.
[~nicolomonili] If you believe this is still a bug of ours, please provide a test case and we'll take a look. Thanks!
bug or not, it is unthinkable that the "change" event, now , behaves as I described! it is not possible that the event will unleash all those times as shown in the video this is a sample code
Verified behavior as described occurs with iOS 7 and does not occur on iOS 6 with sample code below: Please note, "switch" is a reserved word. This might cause unexpected behavior, and may throw code errors in Studio. (Ticket to be opened on this subject)
Steps to reproduce: 1) Install to device or simulator 2) Monitor console 3) Tap or swipe to change switch state Result - works as expected, but occasionally swipe will generate more than one change event 4) Press and drag off the control Result - change event thrown until finger lifted
I know that switch is a reserved word , in fact, in my tests do not use. I used in this case to show the code
[~nicolomonili] That comment was more for the QE team. When a ticket is fixed, we use the code from the original ticket to create a test case. I added the window for the same reason.
Pull merged.
31X https://github.com/appcelerator/titanium_mobile/pull/4696 master https://github.com/appcelerator/titanium_mobile/pull/4695
Test case
Verified the fix with: Appcelerator Studio: 3.1.3.201309132456 SDK: 3.1.3.v20130916153052 acs:1.0.6 alloy:1.2.2-cr npm:1.3.2 titanium:3.1.2 titanium-code-processo:1.0.2 OSX: 10.8.4 Xcode:5.0 GM seed Devices:ipad3(v7.0),ipod touch3(v6.1.3)
Using the above code have verified the fix. the event of change is being called only once at the end of the movement on the switch. Hence closing the issue.
SDK 5.0.2 and iOS 9. The issue has come back
[~nicolomonili] a test case please, along with your environment.
i have a video on iOS 9 , but i can't post it if the issue is CLOSED
FYI
Reopened. What was the last SDK you used where it worked?
I noticed now that the problem is also on iOS 8 with the SDK 3.5.1
Try 3.5.1 on iOS 7.
SDK 3.5.1 , iOS 7 simulator : i have this error
Ah, try using an older CLI.
appc use 4.1.3
and then re-run. You canappc-use 5.0.2
afterwards to get backSDK 3.5.1 , iOS 7 simulator , cli 4.1.3 and xcode 7
Xcode error : !https://mega.nz/#!egIXjCSa!1MElnqqprmP-OiRPlsd8bCMe00AvbambMMzP394NaHE!
Ah, got it. I thought you still had Xcode 6 installed. If you do, and can test, would be helpful to get that data point.
currently i can't install xcode 6 . So , there isn't way to test the issue ?
[~emerriman] could you take a look?
Video test on iOS 9 , SDK 5.0.2 https://mega.nz/#!S45WSbAK!yBz2FCNRxW5SawKoVWvZ3YpyVL51u55qYwRppvnjfFA
+1
Hello we've investigated the issue , the video taken on iOS 9 is displaying the native behavior of the switch. If you were to do the same ,dragging of the switch till the end on any of the switches inside the IPhone settings.The behavior will be the same. The event will be called before the touchend. Hope that helps. Thank you!
Closing ticket as invalid.