Skip to content

Bootstrap Event Handling Causing Performance Issues in Phaser Game #41557

Answered by julien-deramond
ivorcosta asked this question in Q&A
Discussion options

You must be logged in to vote

As you said, you're likely seeing performance issues because Bootstrap's global event listeners (from bootstrap.min.js) are processing clicks on your Phaser canvas, even though they don't affect it.

Is there an official way to tell Bootstrap to ignore events on specific DOM elements?

I'm not the more knowledgeable in JS in the core team, but I don't think there's a Bootstrap API that allows opting-out elements from event delegation. Bootstrap doesn't "scope" its handlers.

Can Bootstrap's event delegation be configured to exclude certain elements?

I'd say not directly. You could only monkey-patch or override event handlers.

Are there known conflicts with Phaser?

Not known, but canvas…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ivorcosta
Comment options

Answer selected by ivorcosta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants