The default out-of-the box template for Blazor doesn't work on mobile - blazor-server-side

If I create a new Blazor application (Server-side or WASM), the default template that is provided with the Counter and Fetch Data menu items doesn't work properly on a mobile device. It run's ok on a desktop browser. Is there something setup incorrectly?
On the mobile, the menu never opens. The hamburger Menu button cannot be tapped. Apart from that, if you manage to navigate by URL to another page, the page keep loading without giving any error.

Related

Instagram Webview disables navigation

I notice that if I put a Vue website in the URL of an Instagram profile, when you click the link, as you click around the site using the Instagram inline-browser (using vue-router), the back/next buttons are disabled.
The only instance of this I can find online is here, but no other details:
https://github.com/swup/swup/issues/403
Does anyone know how this might be fixed?
If you actually click settings in browser, and then close it, all the sudden the back buttons are re-enabled, including all the previous pages you went to in tact in the history... very bizarre.

Ionic 2 login flow with nav menu

Ionic 2 allows a menu controller to show the standard hamburger nav menu toggle button in the nav bar. But by design, it only does this for the root page in the nav stack. The problem is that for an authenticated app, the login page needs to be the root page initially.
I can obviously set the root to the real root page after a successful login, but this causes two issues: 1) The nice page slide animation doesn't fire because it's not pushing a page onto the nav stack. 2) The menu hamburger isn't shown in that page even though it is the root.
This seems like a standard issue for most connected ionic apps, yet I can't find any complete examples. What's the recommended way to make this flow work (ideally without hacking past the built in menu management mechanism)?
UPDATE: The hamburger not showing (#2) was due to programmer error :( That's been resolved. Still looking for a solution to the animation.
this.nav.setRoot(Page, {}, {animate: true, direction: 'forward'});
Solution found enter link description here
After googling 'animate ionic setroot'

ViewStateException - Validation of viewstate MAC failed - Sitefinity ASP.NET MVC with Jquery Mobile

I am getting this error most of the time when I submit my form. I am using Sitefinity 6.2 with ASP.NET MVC 4.0 and JQuery Mobile.
As I have Sitefinity in Hybred mode I am using the #Html.BeginFormSitefinity() command to create the form. On the Controller I have my action with the [HttpPost] attribute. The code always hits my default action on the controller with no problem. No matter what I put in the form when I submit I only get an error message on the page...never hits the HttpPost action.
I've looked around and there are many pages with fixes for the MAC failed issue, but none are working for me. I have a machine key in the web.config and I am NOT going to set enableViewStateMac to false as that is a security hole.
OK I tried working with both of the below solutions but they are both really bad. Here is what I am doing now, which is still not great, but I have Sitefinity, MVC, and JQuery Mobile all on the same page and forms are not giving me View State Exceptions anymore.
First thing is that adding data-ajax="false" is not enough, for this to work you need to disable Ajax before JQuery Mobile starts. So, to do this you need to add in this script BEFORE the JQuery Mobile File loads but after the JQuery file loads.
$(document).bind("mobileinit", function () { $.mobile.ajaxEnabled = false; });
After doing this I then do not use the Sitefinity Begin Form, I just JQuery to change the form on the main page to have the correct action.
<script>
$("#aspnetForm").attr("action", "Home/Login");
</script>
Together this means that there is a complete page load for each page change, and form posts use the form declared in my WebForms Master Page.
-Old Answer -
Actually...what I have below is not working. What I am
currently doing is really ugly but is usually working.
As long as the user enters the site from the home page then the home
page is the Jquery Mobile first page. The view state errors that I
was getting was because it saw the current page as the first page and
the form submit was to the active page. What if the controller for
the home page was just set to handle ALL HTTPPost calls? I have
removed the #Html.BeginFormSitefinity() from all the views with forms
and am just using the form on my top level masterpage. Then I add in
code on the view to change the action of this form to point to the
main page controller. ex
<script>
$("#aspnetForm").attr("action", "Home/Login");
</script>
Once I made this change the forms are not throwing view state
exceptions...as long as the home page is the Jquery Mobile first page.
If the user comes in from a different page then all is scrambled.
Don't have an answer for that yet.
Really Old Answer -
OK, think I have found it. I read somewhere, lost the link now, a
list of issues that can cause the error message. One of them is the
form being submitted from a different page.
I looked at the error message I was getting with Fiddler and noticed
that the Referer was my home page but the URL of the form post was the
URL for the page with my form. In stead of browsing through my site
to the page with the form I typed the URL in the address bar. I tried
submitting my form again and now it works!
So, this is an issue of Sitefinity and JQuery Mobile fighting it out.
When asp.net MVC is run in Hybred mode in Sitefinity it is actually
run in a Web.Forms master page that contains a form. When you use the
#Html.BeginFormSitefinity() to add a form to the view it is actually
just adding a div and then using AJAX to submit the form on the
Web.Forms master page.
JQuery Mobile loads up the first page that you visit, but later pages
are just injected into the existing page. So, there are multiple
data-role="page" divs loaded up in the DOM, inside of the Sitefinity
Web.Forms Master Page.
This all together is causing the form to post with the URL of the
active data-role="page" but the server sees that it is being refered
from the original page I loaded up. So, if I went to the page with
the form first all would work, start at any other page it does not
work.
Now that I know this I can put in data-ajax="false" on the link to the
page with the form and all looks to be working. This will cause
JQuery Mobile to not inject the target page into the current page but
will load all fresh with the target.
data-ajax="false" is the answer!

assign an action to web link UIDataDetectorTypeLink

I have used UIDataDetectorTypeLink to indicate that a string is a link. Tapping it inside my view works fine - it opens the URL in Safari
My question is; is it possible to prevent iOS from opening the URL, so that I can pop-up a dialog to warn the user that they are about to leave my app?
CURRENT BEHAVIOUR:
tap link --> opens link in Safari
DESIRED BEHAVIOUR:
tap link --> prompt the user and ask them if they want to leave the app
YES --> open safari
NO --> stay in app
The reason I am trying to do this is that I think it is nicer in terms of UI behaviour, but you could argue that since the link is clearly a link, the user should know that they are about to leave the app

When debugging, the login and register page layout appears white without the original template settings

I've been using the Ajax Toolkit and when my start page (the login page) loads, it appears white, without the original template settings. It is the same on other pages, like the register page, where the color set and layout have been removed.
Does it have anything to do with the Ajax toolkit?