UWP: WinJS webview preventDefault not working after Windows update 1703 - dom

Windows 10 Creators Update 1703 brought a new issue to my UWP app - I use a WinJS webview to open a web page which navigates to "myscheme://blahblah" after some time. I usually listen to MSWebViewUnsupportedUriSchemeIdentified to catch this event, call event.preventDefault(), and parse the "blahblah" part for my usage.
Before update 1703, the web page was displaying properly, but now that I have updated my windows 10 machine, the webview is blank once the page navigates to myscheme://blahblah. Almost as if event.preventDefault() doesnt work anymore. Anyone know how I can find out if any changes in 1703 cause this behavior?

Using window.external.notify() and listening to MSWebViewScriptNotify events is 100x better for passing data than listening for unsupported URI schemes, and it fixed my issue.

Related

ModalPopupExtender doesn't show on some computers

I maintain a vb.net website. A button on a page shows an AjaxControlToolkit.dll ModalPopupExtender. When I click the button, the page reloads, but no popup appears.
My tests below cover the scenarios I can think of. Please help me diagnose and fix.
This ModalPopupExtender succeeded in the past. The error might have started when we moved to a new server, or when we implemented https, or a browser update, or at some other time since then.
Tried Chrome (latest) and Firefox.
I RDPed into the server and opened the page in Chrome there. ModalPopupExtender succeeded. Same Chrome version as my PC. So, unlikely to be a code issue.
A different page on the same site uses ModalPopupExtender successfully. So, unlikely to be local PC settings.
I put lines of test code immediately before and after ModalPopupExtender.Show(). Both succeed.
Aha - found it!
Solution
The ASPX/HTML referred to http://ajax.googleapis.com. Changing the references to https made ModalPopupExtender.Show() work correctly for me.
Explanation/Diagnosis (if you can clarify further, please comment)
When I checked the html served to my browser, I noticed it defined a javascript function called fn(). The definition for fn() didn't appear in the html served to the server's browser. After the https change, fn() no longer appears in the html I receive. The other page, where ModalPopupExtender worked, didn't have any reference to googleapis.com.
I assume that using http instead of https caused ajax.googleapis.com to provide fn() and that fn() in some way interfered with the normal operation of my ModalPopupExtender.
Here's the fn() definition: (function {var fn = function() {Sys.Extended.UI.ModalPopupBehavior.invokeViaServer('ctl00_cphContent_ModalPopupExtenderConfirm', true); Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
Note: the http also included another javascript function related to the ModalPopupExtender. But there was a similar one on the working page, and in the working version served to the server's browser, and in my fixed version. So, I assume that function is correct.

Java webstart replaces jnlp with wifi login page html

My webstart runs fine whenever there is internet connection. It also runs fine when I disconnect from wifi. But it does not work if my computer is connected to public wifi (ie. coffeeshop, airport, etc) such that if I open a browser it forwards me to a html page that asks me to click on a button to connect to internet.
Basically Java webstart thinks that the html welcome page is the new update to my jnlp file so it replaces my jnlp with the welcome page html. Of course that will fail to parse, so I get a parse error and I cannot recover from it unless I completely remove my webstart application from cache and re-download and re-install it.
Has anyone else experienced this? Is there a way to prevent this issue?
I submitted a bug report to OpenJDK:
https://bugs.openjdk.java.net/browse/JDK-8079874
Unfortunately it's marked as incomplete. Evidently I wasn't clear about what the problem is. I'll try to get in touch with them to see which part is not clear.

Single page application cache issue

I have an single page application created in MVVM and knockout,typescript technology.
I am using knockout templating for creating different views within a Page.
The application Page has a view which shows a list of tasks user can start,pause,resume tasks.accordingly status changes using knockout.The database is getting updated but the UI doesnt reflect changes.
This application works fine in chrome but in IE the page doesn't get refreshed.In IE when from settings i choose request for new version of stored pages everytime.It works fine in IE also.
can any one help me out with a solution for this problem
It seems that your problem with the non-refreshing UI is a json caching problem.
Try to disable jquery ajax caching
$.ajaxSetup({ cache: false });
globally or just temporarily for the request which causes the problem.
IE is caching JSON responses, you wil find your response as a .json file in the temporary internet files folder :)
More information can be read here

So i switched back to Classical SoundCloud and i'm in trap

I'm in the new web version of http://soundcloud.com
I click on an icon bubble with heart (Latest activities) and get and get page
"Oh no. Sorry! Something went wrong.
Is your network connection unstable or browser outdated?"
Everything is fine but if you click the "Switch back to classical SoundCloud" button on this page you get a trap. For me it is a classical soundcloud.com with a half working interface and button Switch to a new version which goes to nowhere.
I get error stack in the webinspector
Uncaught Error: NotFoundError: DOM Exception 8 base.js:339
jQuery.extend.clean base.js:339
buildFragment base.js:326
jQuery.fn.extend.domManip base.js:319
jQuery.fn.extend.append base.js:308
SC.ATI.request base.js:1052
(anonymous function) base.js:1046
jQuery.extend.each base.js:31
SC.ATI.process base.js:1045
SC.ATI.push base.js:1052
(anonymous function) base.js:1465
jQuery.event.handle base.js:146
elemData.handle.eventHandle base.js:115
jQuery.event.trigger base.js:140
(anonymous function) base.js:182
jQuery.extend.each base.js:31
jQuery.fn.jQuery.each base.js:12
jQuery.fn.extend.trigger base.js:182
trackEvent base.js:1257
(anonymous function) base.js:1258
(anonymous function) base.js:1261
jQuery.event.handle base.js:146
elemData.handle.eventHandle
And i can't return a new version of the site and older one is not working. Only a full clear of cookies helps.
Environment:
Chrome Version 27.0.1453.93
Mac OS 10.7.5
So how can i view my activities in the new version?
You should contact SoundCloud support here. StackOverflow is only useful for programming related questions (i.e. using the SoundCloud API).
If you're answer isn't already solved from contacting Soundcloud! Here's one!
On your browser (I'm using chrome) clear your browsing data!
So you'll clear:
History,
Downloads,
Cookies,
The Cache (I think this is the one you want),
And I had; Data from hosted apps
This will revert the change back so your browser never knew you clicked on it!

QTP - See through invisible window (JBoss error mask upon returning to page from a popup)

Steps:
QTP identifies a few links on a web App.
I click on this link (using qtp).
Application opens a popup to change a few values.
I submit the Image button after changing the values.
I return back to the original page, which is open in the background (never closed).
But QTP now does not recognize those few links (as said in point 1), instead it only shows a hierarchy upto Page as shown below:
Browser("name:=JBoss Web/2.1.7 - Error report").Page("title:=JBoss Web/2.1.7 - Error report")
I have to use a Browser("name:=JBoss Web/2.1.7 - Error report").refresh code to get the properties visible again everytime I get back from the popup.
Notes - This occurs on a few machines (different behavior on different machines). Very few systems do not show the JBoss error when accessing through QTP. OS, QTP and browser versions are same with default settings.
Upon changing registry value as shown below, I was able to access all of the web elements most of the times. However, at times, I get the JBOSS error (browser,page) mask again which seems to be impenetrable.
[HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\Packages\StdPackage\Settings]
"SkipWndMovedOut"=dword:00000001
Any suggestions on what needs to be done to access all the elements every time - by surpassing the JBOSS error mask page every time?
Thanks,
Anuroop.
What version of QTP are you using?
This sounds like a known bug which was fixed for QTP10 by hotfix QTPWEB_00065 (there are hotfixes for other versions too).
I suggest you contact HP support in order to get the relevant hotfix.
As a workaround in the meantime you can use Browser's undocumented RefreshWebSupport method which reconnects QTP to the page without refreshing the page.