# GUI text input with Opera browser

**URL:** <https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288>\
**Category:** Questions\
**Tags:** gui, input, text\
**Created:** [April 28, 2026, 4:05pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288 "2026-04-28T16:05:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 28, 2026, 4:05pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/1 "2026-04-28T16:05:20Z")

</div>

I use the Opera browser and with GUI text inputs when I type numbers in with some numbers it switches tabs and other numbers it zooms in or out. Is there any way to prevent this from happening or is this a bug?

Here is a playground, it does not happen in any other browser.

> **[Babylon.js Playground](https://playground.babylonjs.com/?BabylonToolkit#JSFJKK)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 28, 2026, 4:41pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/2 "2026-04-28T16:41:33Z")

</div>

I added this to the input and it seems to fix the issue

```auto
input.onKeyboardEventProcessedObservable.add((evt) => {

    evt.preventDefault();

});

```

---

<div class="post-metadata">

**Author:** ![amoebachant](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amoebachant/32/39450_2.png) [@amoebachant](https://forum.babylonjs.com/u/amoebachant)\
**Post date:** [April 28, 2026, 10:18pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/3 "2026-04-28T22:18:06Z")

</div>

Hi @Trevor_Orr,

Looks like you found the root cause! The InputText control calls preventDefault() on some special key combinations but not on printable characters like numbers and letters. Opera (and Chrome) uses Ctrl+number shortcuts for tab switching and zoom, so when you hold Ctrl and press a number while the input has focus, the keystroke is consumed by both the GUI input and the browser.

We’ve added preventDefault() for printable characters when the input actually consumes the keystroke, which prevents the browser from also acting on it. Your workaround with onKeyboardEventProcessedObservable works great in the meantime.

A fix is on the way, thanks for reporting this!

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 28, 2026, 10:48pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/4 "2026-04-28T22:48:03Z")

</div>

That is the curious part though I was not press the Ctrl key while entering in numbers.

---

<div class="post-metadata">

**Author:** ![amoebachant](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amoebachant/32/39450_2.png) [@amoebachant](https://forum.babylonjs.com/u/amoebachant)\
**Post date:** [April 28, 2026, 11:21pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/5 "2026-04-28T23:21:00Z")

</div>

I wasn’t able to repro without CTRL held down - can you double check? I know this may sound funny, but I’ve had CTRL stick on my keyboard multiple times in the past (had to press both repeatedly to get it back to a good state). Any chance that happened to you?

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 28, 2026, 11:32pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/6 "2026-04-28T23:32:11Z")

</div>

I have another keyboard around somewhere I will give it a try

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 28, 2026, 11:36pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/7 "2026-04-28T23:36:42Z")

</div>

I tried another keyboard and it does the same thing

---

<div class="post-metadata">

**Author:** ![amoebachant](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amoebachant/32/39450_2.png) [@amoebachant](https://forum.babylonjs.com/u/amoebachant)\
**Post date:** [April 28, 2026, 11:57pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/8 "2026-04-28T23:57:43Z")

</div>

Thanks for double checking - so when you run that playground in Opera, you click in the text box, then press a number like 2, and it switches to tab 2? I want to make sure I can repro the same thing so I ensure this is the right fix. I appreciate your help!

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 29, 2026, 12:00am UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/9 "2026-04-29T00:00:42Z")

</div>

Yes, that is correct. It happens only in Opera. I tried it in Chrome, Edge, Firefox and Brave with both keyboards.

---

<div class="post-metadata">

**Author:** ![amoebachant](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amoebachant/32/39450_2.png) [@amoebachant](https://forum.babylonjs.com/u/amoebachant)\
**Post date:** [April 29, 2026, 12:03am UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/10 "2026-04-29T00:03:55Z")

</div>

I just tried again in a fresh install of Opera and I opened 5 tabs, then opened [Babylon.js Playground](https://playground.babylonjs.com/?BabylonToolkit#JSFJKK) and tried typing 12345 in the text box and it didn’t switch tabs. Is it possible you have an extension installed that’s changing the behavior?

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 29, 2026, 12:14am UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/11 "2026-04-29T00:14:21Z")

</div>

Well crap, I tried it in an incognito window and it does not do it. So it must be an extension. I will disable them one by one to track down the culprit.

---

<div class="post-metadata">

**Author:** ![Trevor\_Orr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevor_orr/32/50348_2.png) [@Trevor\_Orr](https://forum.babylonjs.com/u/Trevor_Orr)\
**Post date:** [April 29, 2026, 12:28am UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/12 "2026-04-29T00:28:49Z")

</div>

Weird, I disabled all extensions, restarted Opera and it still does the same thing. Guess the issue is on my end somewhere.

---

<div class="post-metadata">

**Author:** ![amoebachant](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/amoebachant/32/39450_2.png) [@amoebachant](https://forum.babylonjs.com/u/amoebachant)\
**Post date:** [April 29, 2026, 6:51pm UTC](https://forum.babylonjs.com/t/gui-text-input-with-opera-browser/63288/13 "2026-04-29T18:51:54Z")

</div>

That is odd! I think the fix is still worthwhile though, so it has been merged. Thanks for reporting this!
