Activities of "ageiter"

Answer

Sorry, I didn't realize that this part with the deactivation is not part of your code:

        else
        {
            MenuItem.Deactivate();
        }

I then wanted to apply the bugfix to the other problem as well, but that didn't work. Another fix needs to be found there.

I hope you can still improve the menu (especially TopMenu, we use this for most applications) so that the following can be done:

  1. deactivate the activated item when leaving the actual page via another way than the menu
  2. reload the page when you click again on an already active item
  3. bug with the display of active items (see other question with the videos)
Answer

Check out my entry here: https://support.abp.io/QA/Questions/6573/Top-Menu-Display-Issue#answer-3a108f96-0ab9-7cef-96bd-5a704ef89887

Answer

I don't think you've understood what the error means.

Short and simple: Your menu control does not always update the state of the items correctly. Sometimes already selected menu items are NOT deactivated, even though the user has been on another page for a long time. In this case, several menu items are displayed as active at the same time.

I and others have been pointing out this problem for some time. This is not directly related to my question, but the cause is the same and so we have found the solution with my case.

Are you going to fix this in your code or not?

Answer

??? Not a bug ???

I just showed you how to solve a bug in your (!) MainMenuItem and the thanks for that is that I don't even get a refund?

Answer

I went through these methods step by step during debugging. And actually everything seems to be correct, for my MenuItem "Terminations" MenuItem.Deactivate() is executed and no other is activated. And yet it remained selected / activated.

Then I added a StateHasChanged() and now it works. So it seems that the menu is not being re-rendered.

I assume that the other menu problems also have something to do with this... it happens again and again that the status of the selection (IsActive) does not work correctly and probably only because it is not re-rendered.

This information should be enough for a fix. Can you refund me the question?

Answer

You can try to override the MainMenuItem component

The problem with overriding the ActivateCurrentPage()method is that it is not called when I open the edit page. Otherwise the menu would work correctly. If I am on the edit page and then press F5 for a reload, the menu shows correctly (nothing selected).

The call from the list is made as follows: NavigationManager.NavigateTo($"/termination/{input.Id}");

How can I ensure that ActivateCurrentPage() is also executed?

Answer

Yes, I know. I just mentioned the possibility of returning to the upper menu from the breadcrumbs.

Ah ok, but the user will of course click on the menu link... and if nothing happens, that's not so great of course.

You can try to override the MainMenuItem component I'm going to try that out.

In general, the menu still has a few bugs when displaying the active item. Sometimes an item remains selected, although you are already on another item (then 2 are displayed as selected at the same time). I already complained about this problem some time ago and it would be nice if you could make a fix for it.

It would also be useful if the page was reloaded when clicking on an already selected menu item. You said there that this would be included in the official release as a fix, which probably never happened. https://support.abp.io/QA/Questions/4397/Menu-item-that-has-already-been-selected-cannot-be-selected-again#answer-3a09668d-87cc-d807-2be2-e915eab414e7

Answer

On the one hand, I use Blazor and not MVC. And secondly, I'm not talking about the breadcrumbs, but the normal menu. Or how did you mean exactly how I should do it?

I know that it would work if I had an "Edit termination" menu item. But that would make no sense at all to make such a menu entry. Or can I hide it?

There must be a way to remove the selection from the menu. It happens often that pages are shown that are not in the menu...

I have found the problem... actually the setting was enabled to delete the cookies when closing the browser :-( I don't know that I ever enabled this... but now, after disabling it, it works as it should.

The setting can be found under: edge://settings/clearBrowsingDataOnClose

Thanks for your support!

I think we have a misunderstanding here.

When I am logged in, the cookie is correctly present. In the case where it does NOT work, I am not yet logged in. It would be the second screenshots from the login page that are relevant.

But we are probably looking in the wrong place. I have now found out that the cookies are there as long as the browser is open. After closing the browser (not just the tab, but the entire browser), these cookies are gone again.

Here are a few screenshots of the cookie cache:

  1. Before starting the application:

  2. Application started (not logged in):

  3. Logged in ("Remember me" checked):

  4. Stop the application, but keep the browser open:

  5. Close browser and reopen it:

However, I have not set any rules that would delete the cookies after closing the browser.

I checked various browsers again and found out that this behavior only occurs in the Edge browser (Chrome and Firefox work correctly). Any ideas?

Showing 31 to 40 of 208 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13