[TIMOB-2095] iOS - Titanium.UI.Slider 'touchend' event is fired 2X
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-06-03T15:10:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Thomas Huelbert |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:10:20.000+0000 |
Updated | 2012-02-10T00:53:10.000+0000 |
Description
1.use the script below, and note how many times the event is
fired
results:the event is fired twice. works as expected on android.
var win = Ti.UI.currentWindow;
var slider = Titanium.UI.createSlider({
min:0,
max:100,
value:5,
width:100,
height:'auto',
top:30
});
slider.addEventListener('touchend', function(e){
Ti.API.info("touchend");
}); win.add(slider);
(from [0695e5a1ce39b3ff73983a0f21192258bbbdfd22]) [#2095 state:fixed-in-qa] Workaround for Apple bug where EventTouchUpInside is fired 2x with inaccurate timestamps. https://github.com/appcelerator/titanium_mobile/commit/0695e5a1ce39b3ff73983a0f21192258bbbdfd22"> https://github.com/appcelerator/titanium_mobile/commit/0695e5a1ce39...
Bug filed with Apple. Radar # is 8910360.
Tested on iPhone Simulator 4.2 with the code provided and works as expected.
Ti. SDK 1.6 (Jan 25 2011 17:39 r1ead074f)
Reopened by #3580.
Note that Apple stated they would not fix this bug.
sliderEnd: in TiUISlider.m was patched with a timer to alleviate this Apple bug.
Verified fixed (event only fires once) with Verizon iPhone 4 (4.2.8) , Titanium Studio, build: 1.0.0.201106021621, Titanium SDK version: 1.7.X rc9515533.