Jump to content

android 4.1.1 - strange default browser behavior


bubamara
 Share

Recommended Posts

Hi guys,

 

when I click on "delete" button on Android device 4.1.1 using it's default browser, graphics & text aren't removed, just sprite. With latest Firefox for Android, it's ok. Also works fine on PC, IOS.

Anyone else can confirm this?

 

Here's the code : 

<!DOCTYPE HTML><html>	<head>		<script type="text/javascript" src="pixi.js"></script>	</head>	<body>		<script>			var stage = new PIXI.Stage(0x3c3c3c);			var renderer = PIXI.autoDetectRenderer(320, 480);			document.body.appendChild(renderer.view);						var graphics = new PIXI.Graphics();			graphics.beginFill(0x808080, 1);				graphics.drawRect(0,0,100,100);			stage.addChild(graphics);			graphics.endFill();						var text = new PIXI.Text("text", {font: "20px Arial", fill: "#ffffff"});			text.position.x = 20;			text.position.y = 20;			stage.addChild(text);						var texture = PIXI.Texture.fromImage("bunny.png");			var bunny = new PIXI.Sprite(texture);			bunny.position.x = 50;			bunny.position.y = 50;			stage.addChild(bunny);						animate();						function animate() {				requestAnimFrame(animate);				renderer.render(stage);			}						function del() {				stage.removeChild(graphics);				stage.removeChild(text);								stage.removeChild(bunny);			}		</script>		<button name="button" onClick="del();">delete</button>			</body></html>

Thank you,

-bubamara

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...