diff --git a/src/generators/dom/visitors/attributes/addElementAttributes.js b/src/generators/dom/visitors/attributes/addElementAttributes.js
index de0699e4e490..1f1132aa737b 100644
--- a/src/generators/dom/visitors/attributes/addElementAttributes.js
+++ b/src/generators/dom/visitors/attributes/addElementAttributes.js
@@ -184,7 +184,7 @@ export default function addElementAttributes ( generator, node, local ) {
local.init.addBlock( deindent`
var ${handlerName} = ${generator.alias( 'template' )}.events.${name}.call( ${generator.current.component}, ${local.name}, function ( event ) {
${handlerBody}
- });
+ }.bind( ${local.name} ) );
` );
generator.current.builders.teardown.addLine( deindent`
diff --git a/test/generator/samples/event-handler-custom-node-context/_config.js b/test/generator/samples/event-handler-custom-node-context/_config.js
new file mode 100644
index 000000000000..e2099f96bcc4
--- /dev/null
+++ b/test/generator/samples/event-handler-custom-node-context/_config.js
@@ -0,0 +1,15 @@
+export default {
+ 'skip-ssr': true,
+
+ html: '',
+
+ test ( assert, component, target, window ) {
+ const event = new window.MouseEvent( 'click' );
+
+ const button = target.querySelector( 'button' );
+
+ button.dispatchEvent( event );
+
+ assert.equal( target.innerHTML, '' );
+ }
+};
diff --git a/test/generator/samples/event-handler-custom-node-context/main.html b/test/generator/samples/event-handler-custom-node-context/main.html
new file mode 100644
index 000000000000..916001d82c9b
--- /dev/null
+++ b/test/generator/samples/event-handler-custom-node-context/main.html
@@ -0,0 +1,25 @@
+
+
+