Closed MaxGiting closed 4 years ago
Also, when you go from 1
to 3
, if you notice, the space between the 1
and the 2
button disappears
This is the same issue as #1344. If there are two identical DOM nodes separated by text, the text will go missing on the next render. You can get around it by wrapping your text nodes in <span>
s.
Yes @mpbarlow the exact same issue. Thank you for linking and the "fix". You mention in your issue this https://github.com/livewire/livewire/blob/1.x/js/dom/morphdom/morphdom.js#L317
Has the file changed since you linked to it? Which line in particular did you think should be investigated?
@MaxGiting I don't believe it's changed since I linked to it. I didn't look too far into it, but based on the description in the comment block it sounded likely that that was the cause of the bug.
When using a custom pagination template I have seen strange behaviour. Below are three images in chronological order. When I go from page 1 -> 3 -> 1 the word
to
is removed from the custom paginator template. I have linked an example repo below that is a fresh Laravel install with livewire a custom pagination template and nothing else.Start on page 1
Click to page 3
Click back to page 1 and the word
to
has been removedI have narrowed it down to the
custom-paginator.blade.php
file I have used for the pagination.If I remove the
<span>
tags then the wordof
does not disappear. It does disappear if the wordof
is between any element tags.Steps to reproduce
composer install
.env
artisan migrate
php artisan db:seed --class=ItemSeeder
to populate the databaseartisan serve
and open browserto
will be removed from the string.Context