From af11e27c34f63c11647e7e3539c17672a42a1da9 Mon Sep 17 00:00:00 2001 From: Daybrush Date: Fri, 13 Dec 2019 03:36:24 +0900 Subject: [PATCH] fix: fix event return value --- src/Moveable.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Moveable.tsx b/src/Moveable.tsx index 07c37689b..6245bd3fd 100644 --- a/src/Moveable.tsx +++ b/src/Moveable.tsx @@ -61,7 +61,11 @@ class Moveable extends EgComponent implements MoveableInterface { const events: any = {}; EVENTS.forEach(name => { - events[camelize(`on ${name}`)] = (e: any) => this.trigger(name, e); + events[camelize(`on ${name}`)] = (e: any) => { + if (this.trigger(name, e) === false) { + e.stop(); + } + }; }); render(