[AC-1032] Alloy: Not possible to focus a TextField
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-12-31T00:07:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | TCSupportTriage, focus, textfield |
Reporter | Matej |
Assignee | Mauro Parra-Miranda |
Created | 2014-10-08T16:18:30.000+0000 |
Updated | 2016-03-08T07:37:22.000+0000 |
Description
It is not possible to focus a TextField in newly opened window. Works fine in Classic Ti and it worked in Alloy too... (I can't say exactly in what version ,but it worked for sure...).
index.js
function openBlueWindow(e) {
var win3 = Alloy.createController('bluewin').getView();
$.win1.openWindow(win3);
}
$.win1.open();
index.xml
<Alloy>
<NavigationWindow id="win1" platform="ios">
<Window id="win2" title="Red Window" backgroundColor="red">
<Button id="button" onClick="openBlueWindow">Open Blue Window</Button>
</Window>
</NavigationWindow>
</Alloy>
blueWin.js
function closeWindow(){
$.win3.close();
}
$.textField.focus();
blueWin.xml
<Alloy>
<Window id="win3" title="Blue Window" backgroundColor="blue">
<Button onClick="closeWindow">Close Window</Button>
<TextField id="textField" width="80%" height="35" borderWidth="1px" borderColor="gray"/>
</Window>
</Alloy>
Attachments
File | Date | Size |
---|---|---|
focusTextField.mov | 2014-10-14T15:10:52.000+0000 | 3279685 |
Hi, We tried to reproduce this issue with a sample test case. It’s not a valid bug. We’ve created a workaround for this issue.
TESTING ENVIRONMENT:
Ti SDK 3.4.0.GA Ti CLI 3.4.0 Alloy 1.5.1 Mac OS X 10.9.5 iOS v8.0TEST CODE:
index.xmlindex.js
blueWin.xml
blueWin.js
STEPS TO TEST:
- Create a simple alloy project. - Update project with test code - Run on iOS device/ simulatorEXPECTED RESULT:
It’s working as expected. ThanksHello [~sko]! Can you please take a look to the posted testcase and provide your feedback? Best Regards
Hi, I did try the exactly same workaround before I created this ticket. The thing is that there is some graphic issue when you try to focus a textfield on "window open" event. (See the attachment). As I mentioned in the description (I am not sure on 100%) ,but I think that focusing was working before without any problem.
@Mauro Parra-Miranda, could you please tell me why did you again close an issue that wasn't resolved without any explanation? What is not possible to reproduce? I tested the issue again with Ti 3.4.1 and it still doesn't work. There is some graphic issue (blinking-flashing) when new window is opening using the workaround. I added a video to point out the problem. Focusing was working in an older SDK without any problem, so the functionality had to be broken. Why are reported issues just ignored? Thank you
I can't test it now ,but I think that the issue is not working correctly only in Alloy. Classic Titanium should be alright ,so there has to be something wrong with it.
C'mon guys no answer, really? If that's how it works here then it is finally clear to me why Titanium has so many bugs...