@@ -849,6 +849,71 @@ describe('nested draggable dialogs', () => {
849849 expect ( Math . floor ( childDraggedBounds . top ) ) . to . be . eql ( Math . floor ( childBounds . top ) ) ;
850850 expect ( Math . floor ( childDraggedBounds . left ) ) . to . be . eql ( Math . floor ( childBounds . left ) ) ;
851851 } ) ;
852+
853+ it ( 'should not bubble "drag-start" event to parent dialog' , ( ) => {
854+ const spy = sinon . spy ( ) ;
855+ parentDialog . addEventListener ( 'drag-start' , spy ) ;
856+
857+ drag ( childHeader , dx , dx ) ;
858+
859+ expect ( spy . called ) . to . be . false ;
860+ } ) ;
861+
862+ it ( 'should not bubble "dragged" event to parent dialog' , ( ) => {
863+ const spy = sinon . spy ( ) ;
864+ parentDialog . addEventListener ( 'dragged' , spy ) ;
865+
866+ drag ( childHeader , dx , dx ) ;
867+
868+ expect ( spy . called ) . to . be . false ;
869+ } ) ;
870+ } ) ;
871+
872+ describe ( 'nested resizable dialogs' , ( ) => {
873+ let parentDialog , childDialog , childResizer , dx ;
874+
875+ beforeEach ( async ( ) => {
876+ parentDialog = fixtureSync ( '<vaadin-dialog resizable opened></vaadin-dialog>' ) ;
877+ await nextRender ( ) ;
878+
879+ parentDialog . renderer = ( root ) => {
880+ if ( ! root . firstChild ) {
881+ root . innerHTML = '<div>Parent dialog content</div>' ;
882+
883+ childDialog = document . createElement ( 'vaadin-dialog' ) ;
884+ childDialog . resizable = true ;
885+ childDialog . renderer = ( childRoot ) => {
886+ childRoot . innerHTML = '<div>Child dialog content</div>' ;
887+ } ;
888+ root . appendChild ( childDialog ) ;
889+ }
890+ } ;
891+ await nextUpdate ( parentDialog ) ;
892+
893+ childDialog . opened = true ;
894+ await nextRender ( ) ;
895+
896+ childResizer = childDialog . $ . overlay . $ . overlay . querySelector ( '.se' ) ;
897+ dx = 30 ;
898+ } ) ;
899+
900+ it ( 'should not bubble "resize-start" event to parent dialog' , ( ) => {
901+ const spy = sinon . spy ( ) ;
902+ parentDialog . addEventListener ( 'resize-start' , spy ) ;
903+
904+ resize ( childResizer , dx , dx ) ;
905+
906+ expect ( spy . called ) . to . be . false ;
907+ } ) ;
908+
909+ it ( 'should not bubble "resize" event to parent dialog' , ( ) => {
910+ const spy = sinon . spy ( ) ;
911+ parentDialog . addEventListener ( 'resize' , spy ) ;
912+
913+ resize ( childResizer , dx , dx ) ;
914+
915+ expect ( spy . called ) . to . be . false ;
916+ } ) ;
852917} ) ;
853918
854919describe ( 'touch' , ( ) => {
0 commit comments