Skip to content

up-poll and up-keep don't work well together #763

@nhasselmeyer

Description

@nhasselmeyer

Bug description

I try to use up-poll and up-keep='same-html' on the same element, so that the content of that element is only replaced if the server actually sends new content.

But unpoly only sends one polling request and stops polling afterwards.

Reproduction project

https://stackblitz.com/edit/empty-unpoly-project-nw2cds9r?file=index.html

Steps to reproduce the behavior:

  1. Go to reproduction project linked above
  2. Observe in the browser console that the div is only polled once.

Expected behavior

I expected the element not to be replaced, but to keep polling until the server sends different HTML for that element.

Browser version

  • OS: Ubuntu 22.04
  • Browser Firefox 140, Chrome 138
  • Version: 3.11.0

Additional context

I assume this is releated to the 3.11 polling change that up-poll will stop working if the element is detached from the DOM.

I could obviously get this to work by using custom javascript, but I was hoping that this combination of unpoly attributes would do the job for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions