Skip to content

Commit

Permalink
Merge pull request #147 from stavroskasidis/release/1.17
Browse files Browse the repository at this point in the history
Release/1.17
  • Loading branch information
stavroskasidis authored Dec 21, 2023
2 parents 3508fde + dc0c67d commit 383260b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
6 changes: 3 additions & 3 deletions BlazorContextMenu/BlazorContextMenu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Copyright />
<PackageTags>blazor blazor-component blazor-context-menu context-menu contextmenu menu blazor-menu blazorcontextmenu razor razor-components razorcomponents</PackageTags>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<Version>1.16.0</Version>
<Version>1.17.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<Product>Blazor.ContextMenu</Product>
</PropertyGroup>
Expand Down Expand Up @@ -45,7 +45,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion BlazorContextMenu/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gulp.task("clean:css", function (cb) {
});

gulp.task("min:css", function () {
return gulp.src(["wwwroot/**/*.css", "!wwwroot/**/*.css.js"], { base: "." })
return gulp.src(["wwwroot/**/*.css", "!wwwroot/**/*.min.css"], { base: "." })
.pipe(cssmin())
.pipe(rename({
suffix: ".min"
Expand Down
15 changes: 7 additions & 8 deletions BlazorContextMenu/wwwroot/blazorContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ var blazorContextMenu = function (blazorContextMenu) {
}
}

const sleepUntil = async (f, timeoutMs) => {
return new Promise((resolve, reject) => {
const timeWas = new Date();
const wait = setInterval(function () {
var sleepUntil = function (f, timeoutMs) {
return new Promise(function (resolve, reject){
var timeWas = new Date();
var wait = setInterval(function () {
if (f()) {
clearInterval(wait);
resolve();
Expand Down Expand Up @@ -135,10 +135,9 @@ var blazorContextMenu = function (blazorContextMenu) {
};

var showMenuCommon = function (menu, menuId, x, y, target, triggerDotnetRef) {
return blazorContextMenu.Show(menuId, x, y, target, triggerDotnetRef).then(async function () {

await sleepUntil(() => menu.clientWidth > 0, 1000); //Wait until the menu has spawned so clientWidth and offsetLeft report correctly

return blazorContextMenu.Show(menuId, x, y, target, triggerDotnetRef).then(function () {
return sleepUntil(function () { return menu.clientWidth > 0 }, 1000); //Wait until the menu has spawned so clientWidth and offsetLeft report correctly
}).then(function () {
//check for overflow
var leftOverflownPixels = menu.offsetLeft + menu.clientWidth - window.innerWidth;
if (leftOverflownPixels > 0) {
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ public class Startup
</details>
## Release Notes
<details open="open"><summary>1.16</summary>
<details open="open"><summary>1.17</summary>

>- Upgraded asp .net packages dependencies to 6.0.25 due to security concerns.
</details>
<details><summary>1.16</summary>

>- Fixes issue with opening a contextual menu on the far right side of the window for the first time not properly offsetting. Contributed by [matt-virtualitics](https://github.com/matt-virtualitics).
</details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.25" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.25" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.25" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "6.0.301"
"version": "6.0.417"
}
}

0 comments on commit 383260b

Please sign in to comment.