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

[Bug Report] v-badge with icon gets broken when window is resized #2603

Closed
sindrepm opened this issue Nov 22, 2017 · 4 comments
Closed

[Bug Report] v-badge with icon gets broken when window is resized #2603

sindrepm opened this issue Nov 22, 2017 · 4 comments
Labels
duplicate The issue has already been reported

Comments

@sindrepm
Copy link
Contributor

Versions and Environment

Vuetify: 0.17.2
Vue: 2.5.7
Browsers: Chrome 62.0.3202.94
OS: Windows 7

Steps to reproduce

Add a couple of v-badge components with a v-icon as the badge slot.
Resize the window and watch how the badge gets broken.
You can also toggle the "Console" in the Codepen interface a few times which will show the same effect.
The way I first noticed the bug was with the "Exciting announcement" badge in the nav drawer on the docs page.

Expected Behavior

The badge should stay unchanged.

Actual Behavior

The badge is removed and icon just shows instead.

I have debugged the markup before/after and it seems that the surrounding span which has the badge__badge class is simply removed

Before:

...
<span class="badge__badge red">
   <i data-v-fd715c0e="" aria-hidden="true" class="material-icons icon icon--right theme--dark">plus_one</i>
</span>
...

After:

...
   <i data-v-fd715c0e="" aria-hidden="true" class="material-icons icon icon--right theme--dark">plus_one</i>
...

Reproduction Link

https://codepen.io/anon/pen/rYdbdr

Other comments

I guess it must be something to do with how the slot is used/manipulated inside the component, but it is very weird that it happens on window resize. Also, the behavior differs slightly if you put the v-badge inside a navigation drawer or toolbar.

@sindrepm
Copy link
Contributor Author

Note: this is possibly related to #2550.

@jacekkarczmarczyk
Copy link
Member

jacekkarczmarczyk commented Nov 22, 2017

Simplified testcase https://codepen.io/anon/pen/XzEwwX?editors=1010

Looks like Vue 2.5.4 broke something, 2.5.3 works fine: https://codepen.io/anon/pen/gXeNjy?editors=1010

this.$slots.badge is sometimes undefined in VBadge::render()

@nekosaur nekosaur added the pending review The issue is still pending disposition label Nov 22, 2017
@jacekkarczmarczyk
Copy link
Member

Duplicate of #2550

@jacekkarczmarczyk jacekkarczmarczyk marked this as a duplicate of #2550 Nov 22, 2017
@jacekkarczmarczyk jacekkarczmarczyk added duplicate The issue has already been reported and removed pending review The issue is still pending disposition labels Nov 22, 2017
@lock
Copy link

lock bot commented Apr 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate The issue has already been reported
Projects
None yet
Development

No branches or pull requests

3 participants