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

fix(VNavigationDrawer): wait for nextTick in isTemporary watch #16134

Conversation

vexleet
Copy link
Contributor

@vexleet vexleet commented Nov 20, 2022

Description

When having rail as a prop and v-model i noticed that while resizing the drawer scrim stayed on top and application became unusable because isActive value stayed benig true. Thats why I added nextTick on the update of isActive so when all resizing is done and DOM is updated, we update isActive.

Not 100% sure why this was happening only when you had rail as a prop, but like I said I noticed isActive state being true when you resize.

fix #15807

Motivation and Context

How Has This Been Tested?

I tested visially but I can also maybe create tests checking if scrim is on top when resizing the window

Markup:

// Paste your FULL Playground.vue here

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

When having rail as a prop and v-model i noticed that while resizing the drawer scrim stayed on top
and application became unusable because isActive value stayed benig true. Thats why I added nextTick
on the update of isActive so when all resizing is done and DOM is updated, we update isActive.

fix vuetifyjs#15807
@johnleider
Copy link
Member

I feel like this has more to do with v-overlay than v-navigation-drawer. @KaelWD thoughts?

@vexleet
Copy link
Contributor Author

vexleet commented Nov 22, 2022

I feel like this has more to do with v-overlay than v-navigation-drawer. @KaelWD thoughts?

I personally dont think so because v-overlay is not really used in v-navigation-drawer, because in navigation drawer we only have a div that adds the overlay.

<Transition name="fade-transition">
{ isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && (
<div
class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]}
style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]}
onClick={ () => isActive.value = false }
/>
)}
</Transition>

@johnleider johnleider added this to the v3.0.x milestone Nov 29, 2022
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VNavigationDrawer VNavigationDrawer labels Nov 29, 2022
@johnleider johnleider changed the title fix(navigation-drawer): fix active state not updated on resize with rail fix(VNavigationDrawer): wait for nextTick in isTemporary watch Nov 29, 2022
@johnleider johnleider merged commit 8d4f0e8 into vuetifyjs:next Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VNavigationDrawer VNavigationDrawer T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants