cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deyan Vitanov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11110) WP app crashes when focusOut text input
Date Tue, 19 Apr 2016 15:50:25 GMT

    [ https://issues.apache.org/jira/browse/CB-11110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248024#comment-15248024
] 

Deyan Vitanov commented on CB-11110:
------------------------------------

I've found the problem. It has to do with hiding and showing the inputs on a tabs panel.
In our implementation we put "class" objects (which contain the input) in array and hide/show
them using style.display and input.visible.
It was a bad idea to make mix of canvas UI and html input on top.
Anyway here is some code that makes the cordova freeze:

       window.TextInputInstances = [];

	var TextInput = function(type) {
		PIXI.Container.call(this);
		this.bg = this.addChild(new PIXI.Graphics());

		this.domElement = document.createElement('input');
		this.domElement.type = type;
		this.domElement.className = 'gameTextInput';
		this.domElement.style.fontSize = (42 * config.gameScale) + 'px';
		this.visible = !!this.visible; // update dom element's style.display property
		document.getElementById('gameContainer').appendChild(this.domElement);
		window.TextInputInstances.push(this);
	};

       TextInput.prototype = Object.create(PIXI.Container.prototype);

	TextInput.hide = function() {
	    TextInput._hidden = true;
	    
		TextInputInstances.forEach(function(inst) {
		    inst.domElement.style.display = 'none';
		});
	};

	TextInput.restore = function() {
		TextInput._hidden = false;
		TextInputInstances.forEach(function(inst) {
		    inst.visible = !!inst.visible;
		});
	};

> WP app crashes when focusOut text input
> ---------------------------------------
>
>                 Key: CB-11110
>                 URL: https://issues.apache.org/jira/browse/CB-11110
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8 (deprecated)
>         Environment: Windows Phone 8, Windows Phone 10, Emulator
>            Reporter: Deyan Vitanov
>            Priority: Blocker
>              Labels: triaged, wp8
>
> I have a Cordova app that works great on Android and iOS, but the same code on windows
phone 8 and 1 has this issue.
> When I touch the input - the keyboard appears and I can enter text.
> But when I click outside the input (the game canvas) - the game freezes.
> All buttons become unclickable and there is nothing in the console.
> I can only drag the webview - but nothing more. The keyboard does not go away..the input
is freezed..no errors.
> I tried with cordova 6.0.1 ro 5.1.1 - no difference (bug is present)
> It freezes on phones and emulators.
> Here is screenshot: https://www.dropbox.com/s/5rv34q3a5sl5cwx/emu.png?dl=0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message