Skip to content
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

document mouseenter/mouseleave not fired on Firefox #1846

Closed
Conduitry opened this issue Nov 10, 2018 · 2 comments
Closed

document mouseenter/mouseleave not fired on Firefox #1846

Conduitry opened this issue Nov 10, 2018 · 2 comments
Labels
Milestone

Comments

@Conduitry
Copy link
Member

It seems that Firefox does not fire mouseenter/mouseleave events on the document, so the new <svelte:document on:mouseenter/mouseleave> does not work there. It looks like they are fired on document.body, and they are also fired there on Chrome.

I know the whole point of <svelte:document> was to allow attaching these specific event handlers, but that's not cross-platform. The sanest thing might be to say 'ha, whoops, well don't use that' and to introduce a <svelte:body> that lets you attach handlers to the body. I'm not sure.

@Conduitry Conduitry added bug awaiting submitter needs a reproduction, or clarification labels Nov 10, 2018
@PaulMaly
Copy link
Contributor

PaulMaly commented Nov 10, 2018

I think we should create a svelte special component for each unique html tag and useful global object.

Let's see, we already have and in plans:

<svelte:self>
<svelte:component/>
<svelte:window />
<svelte:document />
<svelte:head />
<svelte:meta />

We missed following possible components:

<svelte:html />
<svelte:body />
<svelte:navigator /> 
<svelte:location />
<svelte:history />

More fun with special components! 😄

@acstll
Copy link
Contributor

acstll commented Nov 11, 2018

This explains sveltejs/v2.svelte.dev#376

I tried adding the new <svelte:document> to the docs and the example I created wasn't working in the REPL in Firefox…

I will try and do some research on this.

@Conduitry Conduitry added this to the 3.x milestone Dec 16, 2018
@Conduitry Conduitry added ~breaking~ and removed awaiting submitter needs a reproduction, or clarification labels Jan 9, 2019
Rich-Harris added a commit that referenced this issue Jan 9, 2019
replace <svelte:document> with <svelte:body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants