-
-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
event handlers added by inferno are breaking on phantomjs (via casperjs) #711
Comments
This has to do with Inferno's (partially) synthetic event system. You can achieve the same workaround by changing Pinging @Havunen and @trueadm because I'm not sure how to approach this. |
Hey, I dont know anything about casperjs, but make sure virtualDOM the node where you are rendering content to is appended to document body. Having "container" appended to document is requirement for clicks to propagate I have been using following simulate click (which works at least in IE, Edge, Chrome, FF): function triggerMouseEvent(node, eventType) {
if (node === null) {
throw new Error('Trying to Click null node!');
}
let event;
if (document.createEvent) {
event = document.createEvent('MouseEvents');
} else {
event = new MouseEvent('click');
}
event.initEvent(eventType, true, true);
node.dispatchEvent(event);
}
triggerMouseEvent(node, 'click'); |
Thanks, I made sure and isn't the case.
…On qui, 12 de jan de 2017 at 08:11 Sampo Kivistö ***@***.***> wrote:
Hey,
I dont know anything about casperjs, but make sure virtualDOM the node
where you are rendering content to is appended to document body.
I have been using following simulate click (which works at least in IE,
Edge, Chrome, FF):
function triggerMouseEvent(node, eventType) {
if (node === null) {
throw new Error('Trying to Click null node!');
}
let event;
if (document.createEvent) {
event = document.createEvent('MouseEvents');
} else {
event = new MouseEvent('click');
}
event.initEvent(eventType, true, true);
node.dispatchEvent(event);
}
triggerMouseEvent(node, 'click');
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#711 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOheWIugORTCiLVXeOYmKg8qWAE57Opks5rRfw6gaJpZM4LhSTF>
.
|
This is related to PhantomJS bug: ariya/phantomjs#13895 |
Well, I think there is no reason to stay with this issue open. |
Observed Behaviour
When using casperjs with phantomjs, inferno fails to deal with triggered events on handlers designated by itself like this:
bundle.js:13859
With this error, the event isn't dispatched as it should because the script is interrupted.
Expected Current Behaviour
Inferno should run the designated handler
More info
es6-map
,es6-weak-map
andobject.assign
instead (without any effect)The text was updated successfully, but these errors were encountered: