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

Safari dom-if slot bug "A problem repeatedly occurred" #5689

Open
dejan9393 opened this issue May 31, 2021 · 1 comment
Open

Safari dom-if slot bug "A problem repeatedly occurred" #5689

dejan9393 opened this issue May 31, 2021 · 1 comment
Labels

Comments

@dejan9393
Copy link

dejan9393 commented May 31, 2021

Hi, there seems to be a bug on the latest version of Safari (14.1.1) when using dom-if with a certain configuration of slots.

I was able to create a minimal reproducible case, but i'm baffled because it seems like a very specific configuration to me.

The problem causes Safari to crash and automatically reload the page with the error "This webpage was reloaded because a problem occurred.". A subsequent error will reload the page again, this time with a black screen stating: "A problem repeatedly occurred with [url]"
Screen Shot 2021-05-31 at 10 51 59 am

I've made a minimal reproduction here:

https://safari-dom-if-bug.glitch.me/

source code is here: https://glitch.com/edit/#!/safari-dom-if-bug

The important snippet that i've narrowed it down to is the following:

element-with-slot.js:

<slot></slot>

app.js:

<element-with-slot>
  <template is="dom-if" if="[[boolean]]">
    <slot>Works!</slot>
  </template>
</element-with-slot>

<slot name="test"></slot>

The curious thing for me is that the snippet actually seems to work without that extra named-slot sibling ([name=test]) after the element-with-slot.

A workaround is to wrap the <dom-if> with something other than a slot (so that the dom-if is not a direct child of the element with a slot). This makes me wonder if this is related to #5065.

Any help appreciated!

@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 12, 2022
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

1 participant