# Uncaught TypeError: t.isDeviceAvailable is not a function

**URL:** <https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543>\
**Category:** Questions\
**Created:** [May 4, 2021, 6:39am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543 "2021-05-04T06:39:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phaselock](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@phaselock](https://forum.babylonjs.com/u/phaselock)\
**Post date:** [May 4, 2021, 6:39am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543/1 "2021-05-04T06:39:57Z")

</div>

I have my console and browser tab separated. When I have browser focus and alt-tab to my console, I’m getting in ffox:

```auto
Uncaught TypeError: t.isDeviceAvailable is not a function
    _checkNonCharacterKeys http://preview.babylonjs.com/babylon.js:16
    _createKeyboardEvent http://preview.babylonjs.com/babylon.js:16
    CreateDeviceEvent http://preview.babylonjs.com/babylon.js:16
    _keyboardBlurEvent http://preview.babylonjs.com/babylon.js:16
    _handleKeyActions http://preview.babylonjs.com/babylon.js:16
    e http://preview.babylonjs.com/babylon.js:16
    Create http://preview.babylonjs.com/babylon.js:16
    attachControl http://preview.babylonjs.com/babylon.js:16
    attachControl http://preview.babylonjs.com/babylon.js:16
    t http://preview.babylonjs.com/babylon.js:16

```

etc…

and in chrome:

```auto
babylon.js:16 Uncaught TypeError: t.isDeviceAvailable is not a function
    at Function.e._checkNonCharacterKeys (babylon.js:16)
    at Function.e._createKeyboardEvent (babylon.js:16)
    at Function.e.CreateDeviceEvent (babylon.js:16)
    at HTMLCanvasElement._keyboardBlurEvent (babylon.js:16)

```

No errors when alt-tabbing from console to browser. ~~Interestingly, I can’t repro in PG.~~

edit: I managed to repro in PG. Open an PG ([https://playground.babylonjs.com/](https://playground.babylonjs.com/)), click your mouse in the right side where the scene is, alt-tab to console, the same error should appear. Hope it helps.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 4, 2021, 10:27am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543/2 "2021-05-04T10:27:03Z")

</div>

Adding @PolygonalSun

---

<div class="post-metadata">

**Author:** ![PolygonalSun](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/polygonalsun/32/2704_2.png) [@PolygonalSun](https://forum.babylonjs.com/u/PolygonalSun)\
**Post date:** [May 10, 2021, 9:22pm UTC](https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543/3 "2021-05-10T21:22:53Z")

</div>

Hey @phaselock, I was unable to repro this. Just out of curiosity, would you happen to know which version of the 5.0.0 alpha you were using?

---

<div class="post-metadata">

**Author:** ![phaselock](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@phaselock](https://forum.babylonjs.com/u/phaselock)\
**Post date:** [May 11, 2021, 12:51am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-t-isdeviceavailable-is-not-a-function/20543/4 "2021-05-11T00:51:47Z")

</div>

I think this has been fixed, not sure which PR. I didn’t log the version, my bad. I will try to put info in OP next time. Thanks for your attention!
