File tree Expand file tree Collapse file tree
apps/files/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,15 +157,6 @@ export default defineComponent({
157157 return this . actionsMenuStore . opened === this . uniqueId . toString ( )
158158 } ,
159159 set ( opened ) {
160- // Only reset when opening a new menu
161- if ( opened ) {
162- // Reset any right click position override on close
163- // Wait for css animation to be done
164- const root = this . $el ?. closest ( 'main.app-content' ) as HTMLElement
165- root . style . removeProperty ( '--mouse-pos-x' )
166- root . style . removeProperty ( '--mouse-pos-y' )
167- }
168-
169160 this . actionsMenuStore . opened = opened ? this . uniqueId . toString ( ) : null
170161 } ,
171162 } ,
@@ -216,6 +207,11 @@ export default defineComponent({
216207 // 200 = max width of the menu
217208 root . style . setProperty ( '--mouse-pos-x' , Math . max ( 0 , event . clientX - contentRect . left - 200 ) + 'px' )
218209 root . style . setProperty ( '--mouse-pos-y' , Math . max ( 0 , event . clientY - contentRect . top ) + 'px' )
210+ } else {
211+ // Reset any right menu position potentially set
212+ const root = this . $el ?. closest ( 'main.app-content' ) as HTMLElement
213+ root . style . removeProperty ( '--mouse-pos-x' )
214+ root . style . removeProperty ( '--mouse-pos-y' )
219215 }
220216
221217 // If the clicked row is in the selection, open global menu
You can’t perform that action at this time.
0 commit comments