@@ -253,6 +253,13 @@ function keyboardRippleHide (e: KeyboardEvent) {
253253 rippleHide ( e )
254254}
255255
256+ function focusRippleHide ( e : FocusEvent ) {
257+ if ( keyboardRipple === true ) {
258+ keyboardRipple = false
259+ rippleHide ( e )
260+ }
261+ }
262+
256263function updateRipple ( el : HTMLElement , binding : VNodeDirective , wasEnabled : boolean ) {
257264 const enabled = isRippleEnabled ( binding . value )
258265 if ( ! enabled ) {
@@ -283,6 +290,8 @@ function updateRipple (el: HTMLElement, binding: VNodeDirective, wasEnabled: boo
283290 el . addEventListener ( 'keydown' , keyboardRippleShow )
284291 el . addEventListener ( 'keyup' , keyboardRippleHide )
285292
293+ el . addEventListener ( 'blur' , focusRippleHide )
294+
286295 // Anchor tags can be dragged, causes other hides to fail - #1537
287296 el . addEventListener ( 'dragstart' , rippleHide , { passive : true } )
288297 } else if ( ! enabled && wasEnabled ) {
@@ -301,6 +310,7 @@ function removeListeners (el: HTMLElement) {
301310 el . removeEventListener ( 'keydown' , keyboardRippleShow )
302311 el . removeEventListener ( 'keyup' , keyboardRippleHide )
303312 el . removeEventListener ( 'dragstart' , rippleHide )
313+ el . removeEventListener ( 'blur' , focusRippleHide )
304314}
305315
306316function directive ( el : HTMLElement , binding : VNodeDirective , node : VNode ) {
0 commit comments