# \[Bug-567\]onKeyDown Capture Esc

**URL:** <https://forum.inductiveautomation.com/t/bug-567-onkeydown-capture-esc/40501>\
**Category:** Ignition\
**Created:** [November 10, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/bug-567-onkeydown-capture-esc/40501 "2020-11-10T19:21:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [November 10, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/bug-567-onkeydown-capture-esc/40501/1 "2020-11-10T19:21:31Z")

</div>

I am trying to capture the key down event in a TextField and I keep getting this in the browser console when I press Esc. Any ideas what is happening?

```auto
PerspectiveClient.ba66a2e7a10e16d722dc.js:12 onerrorLogger: {"stack":"TypeError: this.ref.current.blur is not a function\n at p.onKeyDown (http://localhost:8088/res/perspective/js/PerspectiveComponents.de12fb8cbcce7d1d9447.js:23:51177)\n at r.<anonymous> (http://localhost:8088/res/perspective/js/PerspectiveClient.ba66a2e7a10e16d722dc.js:17:30641)\n at Object.Bi (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:175:175)\n at Ai (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:14:96)\n at Di (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:14:150)\n at wf (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:14:323)\n at Ei (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:175:479)\n at yd (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:15:110)\n at sc (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:15:178)\n at aj (http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js:41:472)","message":"this.ref.current.blur is not a function","name":"TypeError","logData":{"msg":"Uncaught Exception","errorMsg":"Uncaught TypeError: this.ref.current.blur is not a function","url":"http://localhost:8088/res/perspective/js/react-dom.production.min-16.11.0.js","line number":15,"column":218}}
o.cerror @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
o.sendLogItemsConsole @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
b.sendBatch @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
b.sendBatchIfComplete @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
b.log @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
e.log @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
e.fatalException @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
window.onerror.window.onerror @ PerspectiveClient.ba66a2e7a10e16d722dc.js:12
react-dom.production.min-16.11.0.js:15 Uncaught TypeError: this.ref.current.blur is not a function
    at p.onKeyDown (PerspectiveComponents.de12fb8cbcce7d1d9447.js:23)
    at r.<anonymous> (PerspectiveClient.ba66a2e7a10e16d722dc.js:17)
    at Object.Bi (react-dom.production.min-16.11.0.js:175)
    at Ai (react-dom.production.min-16.11.0.js:14)
    at Di (react-dom.production.min-16.11.0.js:14)
    at wf (react-dom.production.min-16.11.0.js:14)
    at Ei (react-dom.production.min-16.11.0.js:175)
    at yd (react-dom.production.min-16.11.0.js:15)
    at sc (react-dom.production.min-16.11.0.js:15)
    at aj (react-dom.production.min-16.11.0.js:41)

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 10, 2020, 9:43pm UTC](https://forum.inductiveautomation.com/t/bug-567-onkeydown-capture-esc/40501/2 "2020-11-10T21:43:37Z")

</div>

This is not a problem with your code. We have an open ticket for this browser-side error.
