@@ -47,7 +47,6 @@ export const InteractionsMixin = (superClass) =>
4747
4848 const overlay = this . _subMenu . $ . overlay ;
4949 overlay . addEventListener ( 'keydown' , this . __boundOnContextMenuKeydown ) ;
50- overlay . addEventListener ( 'vaadin-overlay-open' , this . __alignOverlayPosition . bind ( this ) ) ;
5150
5251 const container = this . _container ;
5352 container . addEventListener ( 'click' , this . __onButtonClick . bind ( this ) ) ;
@@ -276,30 +275,6 @@ export const InteractionsMixin = (superClass) =>
276275 return this . shadowRoot . querySelector ( 'vaadin-menu-bar-submenu' ) ;
277276 }
278277
279- /** @private */
280- __alignOverlayPosition ( e ) {
281- /* c8 ignore next */
282- if ( ! this . _expandedButton ) {
283- // When `openOnHover` is true, quickly moving cursor can close submenu,
284- // so by the time when event listener gets executed button is null.
285- // See https://github.com/vaadin/vaadin-menu-bar/issues/85
286- return ;
287- }
288- const overlay = e . target ;
289- const { width, height, left } = this . _expandedButton . getBoundingClientRect ( ) ;
290- if ( overlay . hasAttribute ( 'bottom-aligned' ) ) {
291- overlay . style . bottom = `${ parseInt ( getComputedStyle ( overlay ) . bottom ) + height } px` ;
292- }
293- const endAligned = overlay . hasAttribute ( 'end-aligned' ) ;
294- if ( endAligned ) {
295- if ( this . __isRTL ) {
296- overlay . style . left = `${ left } px` ;
297- } else {
298- overlay . style . right = `${ parseInt ( getComputedStyle ( overlay ) . right ) - width } px` ;
299- }
300- }
301- }
302-
303278 /** @private */
304279 _itemsChanged ( ) {
305280 const subMenu = this . _subMenu ;
0 commit comments