File tree Expand file tree Collapse file tree 14 files changed +49
-38
lines changed Expand file tree Collapse file tree 14 files changed +49
-38
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0 </TargetFramework >
4+ <TargetFramework >netstandard2.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 <IsPackable >true</IsPackable >
77 <RazorLangVersion >3.0</RazorLangVersion >
1818 <Copyright />
1919 <PackageTags >blazor blazor-component blazor-context-menu context-menu contextmenu menu blazor-menu blazorcontextmenu razor razor-components razorcomponents</PackageTags >
2020 <VersionSuffix >$(VersionSuffix)</VersionSuffix >
21- <Version >1.3 .0</Version >
21+ <Version >1.4 .0</Version >
2222 <Version Condition =" '$(VersionSuffix)' != '' " >$(Version)-$(VersionSuffix)</Version >
2323 <Product >Blazor.ContextMenu</Product >
2424 </PropertyGroup >
4747 </ItemGroup >
4848
4949 <ItemGroup >
50- <PackageReference Include =" Microsoft.AspNetCore.Components" Version =" 3.0 .0" />
51- <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 3.0 .0" />
50+ <PackageReference Include =" Microsoft.AspNetCore.Components" Version =" 3.1 .0" />
51+ <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 3.1 .0" />
5252 </ItemGroup >
5353</Project >
Original file line number Diff line number Diff line change 1818 }
1919
2020
21- var openMenuId = null ;
22- var openMenuTarget = null ;
2321 //Helper functions
2422 //========================================
2523 function guid ( ) {
7472 //===========================================
7573
7674 var menuHandlerReference = null ;
75+ var openMenuId = null ;
76+ var openMenuTarget = null ;
77+ var openingMenu = false ;
7778
7879 blazorContextMenu . SetMenuHandlerReference = function ( dotnetRef ) {
7980 if ( ! menuHandlerReference ) {
8081 menuHandlerReference = dotnetRef ;
8182 }
8283 }
8384
84- blazorContextMenu . ManualShow = function ( menuId , x , y ) {
85+ blazorContextMenu . ManualShow = function ( menuId , x , y ) {
86+ openingMenu = true ;
8587 var menu = document . getElementById ( menuId ) ;
8688 if ( ! menu ) throw new Error ( "No context menu with id '" + menuId + "' was found" ) ;
8789 openMenuId = menuId ;
9092 }
9193
9294 blazorContextMenu . OnContextMenu = function ( e , menuId ) {
95+ openingMenu = true ;
9396 var menu = document . getElementById ( menuId ) ;
9497 if ( ! menu ) throw new Error ( "No context menu with id '" + menuId + "' was found" ) ;
9598 openMenuId = menuId ;
112115 if ( topOverflownPixels > 0 ) {
113116 menu . style . top = ( menu . offsetTop - menu . clientHeight ) + "px" ;
114117 }
118+
119+ openingMenu = false ;
115120 } ) ;
116121 }
117122
123128 var clickedInsideMenu = menuElement . contains ( e . target ) ;
124129 if ( ! clickedInsideMenu ) {
125130 blazorContextMenu . Hide ( openMenuId ) . then ( function ( hideSuccessful ) {
126- if ( hideSuccessful ) {
131+ if ( hideSuccessful && ! openingMenu ) {
127132 openMenuId = null ;
128133 openMenuTarget = null ;
129134 }
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0 </TargetFramework >
4+ <TargetFramework >netstandard2.1 </TargetFramework >
55 <OutputType >Exe</OutputType >
66 <RestoreAdditionalProjectSources >
77 https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
1212 </PropertyGroup >
1313
1414 <ItemGroup >
15- <PackageReference Include =" Blazor.ContextMenu" Version =" 1.1.0-beta-498 " />
16- <PackageReference Include =" Microsoft.AspNetCore.Blazor" Version =" 3.0 .0-preview9.19465 .2" />
17- <PackageReference Include =" Microsoft.AspNetCore.Blazor.Build" Version =" 3.0 .0-preview9.19465 .2" PrivateAssets =" all" />
18- <PackageReference Include =" Microsoft.AspNetCore.Blazor.HttpClient" Version =" 3.0 .0-preview9.19465 .2" />
15+ <PackageReference Include =" Blazor.ContextMenu" Version =" 1.3.0 " />
16+ <PackageReference Include =" Microsoft.AspNetCore.Blazor" Version =" 3.1 .0-preview4.19579 .2" />
17+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.Build" Version =" 3.1 .0-preview4.19579 .2" PrivateAssets =" all" />
18+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.HttpClient" Version =" 3.1 .0-preview4.19579 .2" />
1919 </ItemGroup >
2020
2121 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.0 </TargetFramework >
4+ <TargetFramework >netcoreapp3.1 </TargetFramework >
55 <RestoreAdditionalProjectSources >
66 https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
77 https://dotnet.myget.org/F/blazor-dev/api/v3/index.json;
1616 </ItemGroup >
1717
1818 <ItemGroup >
19- <PackageReference Include =" Microsoft.AspNetCore.Blazor.Server" Version =" 3.0 .0-preview9.19465 .2" />
20- <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 3.0 .0" />
19+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.Server" Version =" 3.1 .0-preview4.19579 .2" />
20+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 3.1 .0" />
2121 </ItemGroup >
2222
2323 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0 </TargetFramework >
4+ <TargetFramework >netstandard2.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 </PropertyGroup >
77
Original file line number Diff line number Diff line change @@ -240,7 +240,13 @@ public class Startup
240240
241241## Release Notes
242242
243- <details open =" open " ><summary >1.3</summary >
243+ <details open =" open " ><summary >1.4</summary >
244+
245+ > - Updated to 3.1 release.
246+ > - Fix for [ #72 ] ( https://github.com/stavroskasidis/BlazorContextMenu/issues/72 ) .
247+ </details>
248+
249+ <details ><summary >1.3</summary >
244250
245251> - Added menu ` OnHiding ` event [ #68 ] ( https://github.com/stavroskasidis/BlazorContextMenu/issues/68 ) .
246252 </details>
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0 </TargetFramework >
4+ <TargetFramework >netstandard2.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 <RazorLangVersion >3.0</RazorLangVersion >
77 </PropertyGroup >
88
99 <ItemGroup >
10- <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 3.0 .0" />
10+ <PackageReference Include =" Microsoft.AspNetCore.Components.Web" Version =" 3.1 .0" />
1111 </ItemGroup >
1212
1313 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netstandard2.0 </TargetFramework >
4+ <TargetFramework >netstandard2.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 <RestoreAdditionalProjectSources >
77 https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
1414 </PropertyGroup >
1515
1616 <ItemGroup >
17- <PackageReference Include =" Microsoft.AspNetCore.Blazor" Version =" 3.0 .0-preview9.19465 .2" />
18- <PackageReference Include =" Microsoft.AspNetCore.Blazor.Build" Version =" 3.0 .0-preview9.19465 .2" PrivateAssets =" all" />
19- <PackageReference Include =" Microsoft.AspNetCore.Blazor.HttpClient" Version =" 3.0 .0-preview9.19465 .2" />
17+ <PackageReference Include =" Microsoft.AspNetCore.Blazor" Version =" 3.1 .0-preview4.19579 .2" />
18+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.Build" Version =" 3.1 .0-preview4.19579 .2" PrivateAssets =" all" />
19+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.HttpClient" Version =" 3.1 .0-preview4.19579 .2" />
2020 </ItemGroup >
2121
2222 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.0 </TargetFramework >
4+ <TargetFramework >netcoreapp3.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 </PropertyGroup >
77
88 <ItemGroup >
9- <PackageReference Include =" Microsoft.AspNetCore.Blazor.Server" Version =" 3.0 .0-preview9.19465 .2" />
10- <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 3.0 .0" />
9+ <PackageReference Include =" Microsoft.AspNetCore.Blazor.Server" Version =" 3.1 .0-preview4.19579 .2" />
10+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version =" 3.1 .0" />
1111 </ItemGroup >
1212
1313 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >netcoreapp3.0 </TargetFramework >
4+ <TargetFramework >netcoreapp3.1 </TargetFramework >
55 <LangVersion >7.3</LangVersion >
66 <AddRazorSupportForMvc >true</AddRazorSupportForMvc >
77 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments