K
K
KoRNeT46RuS2016-12-16 15:22:25
JavaScript
KoRNeT46RuS, 2016-12-16 15:22:25

Cannot read property 'data' of null how to solve the problem?

I'm trying to add an event object to the trigger.

.trigger({type: 'keydown', keyCode: 13, ctrlKey: true})

To pass into the condition
element.on('keydown', (_event) => {
                            if (_event.keyCode == 13 && _event.ctrlKey) {

As a result, it gives me an error
TypeError: Cannot read property 'data' of null
How to fix it. Tell

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question