Skip to content

fix(android): improve Window focus/blur events#14456

Draft
m1ga wants to merge 1 commit into
mainfrom
androidFocusBlur
Draft

fix(android): improve Window focus/blur events#14456
m1ga wants to merge 1 commit into
mainfrom
androidFocusBlur

Conversation

@m1ga
Copy link
Copy Markdown
Contributor

@m1ga m1ga commented Jun 3, 2026

Will fire blur/focus event when you drag down the statusbar on your phone.

Note: This will also fire when an alert is shown! That is currently not the case. So I'm not sure if we should use a different event for this as it may cause problems in existing apps.

var win = Ti.UI.createWindow({});
var btn = Ti.UI.createButton({
	title: "alert",
})

win.add(btn);
win.open();

win.addEventListener("focus", function(){
	console.log("win focus")
})
win.addEventListener("blur", function(){
	console.log("win blur")
})

btn.addEventListener("click", function(e) {
	alert(1);
})

I could change it to windowblur and windowfocus so you have a different event for these new blur/focus and it won't break any exisint blur/focus usage on a window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant