-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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(VDialog/VMenu): enable pointer-events for disabled activator #5511
fix(VDialog/VMenu): enable pointer-events for disabled activator #5511
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #5511 +/- ##
==========================================
- Coverage 88.58% 88.53% -0.06%
==========================================
Files 281 281
Lines 6169 6173 +4
Branches 1534 1535 +1
==========================================
Hits 5465 5465
- Misses 587 589 +2
- Partials 117 119 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this type of logic should be in bootable
so we don't have to duplicate the logic.
}, children) | ||
}, [ | ||
this.genActivator(), | ||
this.disabled ? null : this.genContent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be handled in genContent
similar to what genActivator
does?
@@ -145,6 +145,77 @@ export default { | |||
// Since this should only be called in a capture event (bottom up), we shouldn't need to stop propagation | |||
return getZIndex(this.$refs.content) >= this.getMaxZIndex() | |||
}, | |||
genActivator () { | |||
if (!this.$slots.activator) return null | |||
if (this.disabled) return this.$slots.activator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause different layout behaviour depending on if the dialog is disabled or not. Didn't we say to just ignore the click event? It doesn't need a rewrite of the entire render function.
a75380c
to
7fd37bf
Compare
Please create unit tests that correlate to the changes made in this request. |
ea0b9ae
to
e19fa91
Compare
Update: added tests and external activator support, updated Playground.vue. The button for menu with external activator and open-on-hover prop doesn't work though because of #5860 |
Description
Don't render contents and remove
pointer-events: none
for disabled menu/dialogMotivation and Context
fixes #5472
How Has This Been Tested?
visuall, updated unit
Markup:
Types of changes
Checklist:
master
for bug fixes and documentation updates,dev
for new features and breaking changes).