Skip to content

GameConfig dom behindCanvas setting true not working #5749

@iamallenchang

Description

@iamallenchang

Version

  • Phaser Version: 3.24.1

  • Operating system: macos 11.2.1

  • Browser: Chrome

Description

config setting behindCanvas ture or false, but Chrome see Elements div always over canvas

Example Test Code

gameConfig

  type: Phaser.AUTO,
  scale: {
  	parent: 'phaser-game',
  	mode: Phaser.Scale.FIT,
  	autoCenter: Phaser.Scale.CENTER_BOTH,
  	width: GameSetting.DEFAULT_WIDTH,
  	height: GameSetting.DEFAULT_HEIGHT
  },
  dom: {
  	createContainer: true,
  	behindCanvas: true
  },
  antialias: true,
  plugins: {
  	scene: [{
  		key: 'rexUI',
  		plugin: RexUI,
  		mapping: 'rexUI'
  	}, {
  		key: 'SpinePlugin',
  		plugin: window.SpinePlugin,
  		mapping: 'spine'
  	}]
  },
  audio: {
  	disableWebAudio: false
  },
  disableContextMenu: true,
  version: process.env.VERSION,
  banner: {
  	hidePhaser: true
  },
  scene: [
  	MainScene
  ]
} 

Additional Information

截圖 2021-06-17 下午3 20 17

if anyone has any information I would be thankful!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions