New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ios): fire blur event when TabGroup focus is removed #12207
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
sgtcoolguy
approved these changes
Nov 2, 2020
ssjsamir
approved these changes
Nov 5, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed: Tested using the following test case:
var basewin = Ti.UI.createWindow({
backgroundColor : 'white',
layout : 'vertical'
});
var baseWinBtn = Ti.UI.createButton({
title : 'Push next window (tab.open(win))',
top : 60
});
basewin.add(baseWinBtn);
var baseWinBtn2 = Ti.UI.createButton({
title : 'Open another window (win.open())',
top : 120
});
basewin.add(baseWinBtn2);
var baseWinBtn3 = Ti.UI.createButton({
title : 'Show Alert',
top : 180
});
basewin.add(baseWinBtn3);
baseWinBtn.addEventListener('click', function() {
var indWin = Ti.UI.createWindow({
backgroundColor : 'red'
});
tab.open(indWin);
var alertBtn = Ti.UI.createButton({
top: 60,
title :'click to get alert'
});
alertBtn.addEventListener('click',function(){
Ti.UI.createAlertDialog({
title : "test",
message : "test msg",
buttonNames : ['OK']
}).show();
});
indWin.add(alertBtn);
var closeBtn = Ti.UI.createButton({
top: 120,
title :'Close Window'
});
closeBtn.addEventListener('click',function(){
tab.close(indWin);
});
indWin.add(closeBtn);
});
baseWinBtn2.addEventListener('click', function() {
var indWin = Ti.UI.createWindow({
backgroundColor : 'red'
});
indWin.open(); //{modal: true, animation: true}
var closeBtn = Ti.UI.createButton({
title :'Close button'
});
closeBtn.addEventListener('click',function(){
indWin.close();
});
indWin.add(closeBtn);
});
baseWinBtn3.addEventListener('click', function() {
Ti.UI.createAlertDialog({
title : "test",
message : "test msg",
buttonNames : ['OK']
}).show();
});
var tabGroup = Ti.UI.createTabGroup({
title : '',
titleColor : "#bbb",
tintColor : "#bbb",
navBarHidden : true
});
var tab = Ti.UI.createTab({
title : 'tab1',
window : basewin
});
tabGroup.addTab(tab);
var tab2 = Ti.UI.createTab({
title : 'tab2',
window : Ti.UI.createWindow({backgroundColor : 'white'})
});
tabGroup.addTab(tab2);
tabGroup.open();
tabGroup.addEventListener('focus',function(e){
Ti.API.info('in tabgroup focus');
});
tabGroup.addEventListener('blur',function(e){
Ti.API.info('in tabgroup blur');
});
Test Environment
MacOS Big Sur: 11.0 Beta 9
Xcode: 12.2 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
iphone 11 (14.2) Sim
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://jira.appcelerator.org/browse/TIMOB-28111