File tree 2 files changed +13
-0
lines changed
floating-vue/src/components
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,8 @@ Floating Vue will automatically fix the [diagonal submenu problem](https://www.g
278
278
<img alt =" popper aim debug example " src =" ./popper-aim.png " class =" border border-gray-200 rounded " >
279
279
</div >
280
280
281
+ After a one second delay, the lock applied because of aiming will expire.
282
+
281
283
## Disable popper
282
284
283
285
Disabling a popper will prevent it from being shown.
Original file line number Diff line number Diff line change @@ -392,6 +392,10 @@ export default () => ({
392
392
393
393
this . $_pendingHide = false
394
394
if ( force || ! this . disabled ) {
395
+ if ( this . parentPopper ?. lockedChild === this ) {
396
+ this . parentPopper . lockedChild = null
397
+ }
398
+
395
399
this . $_scheduleShow ( event , skipDelay )
396
400
this . $emit ( 'show' )
397
401
@@ -417,6 +421,13 @@ export default () => ({
417
421
if ( this . $_isAimingPopper ( ) ) {
418
422
if ( this . parentPopper ) {
419
423
this . parentPopper . lockedChild = this
424
+ clearTimeout ( this . parentPopper . lockedChildTimer )
425
+ this . parentPopper . lockedChildTimer = setTimeout ( ( ) => {
426
+ if ( this . parentPopper . lockedChild === this ) {
427
+ this . parentPopper . lockedChild . hide ( { skipDelay } )
428
+ this . parentPopper . lockedChild = null
429
+ }
430
+ } , 1000 )
420
431
}
421
432
return
422
433
}
You can’t perform that action at this time.
0 commit comments