microsoft / winstore-jscompat

JavaScript Dynamic Content shim for Windows Store apps
Other
141 stars 59 forks source link

Problem with the focus of a input type text when click on it #7

Open mpedrazzi opened 9 years ago

mpedrazzi commented 9 years ago

Hi, I am trying to build a Windows 8 app with angular, I followed the "Building Windows 8 Applications with AngularJS aka Oh Yes I Did!" tutorial step by step, and it almost worked perfectly.

The problem is on the focus of inputs of type text, when I click on any of these inputs, the focus goes to some other part of the window, and I can't type anything, btab to go tout if I use the fields, it seems to work fine, I can type something, click the button and add the messages.

If I remove the winstore-jscompat include, it works fine (but In have to use MSApp.execUnsafeLocalFunction(function () { ...}); on everything MS says is unsafe).

If you want, you can find my test on:

http://1drv.ms/1BKmb2H

Regards, Matheus

sorskoot commented 9 years ago

Have you tried enabling the Content Security Policy (CSP) support of Angular? This should solve a lot of the unsafe issues. Just add "ng-csp" to the tag of you default.html

mpedrazzi commented 9 years ago

Hi, thanks for your reply.

The problem is when I click on a textbox, you can see in the following image: http://1drv.ms/1xCwEul

I found the problem, and it is not on angular, the problem seems to be on "winstore-jscompat.js", this script removes the need of wrapping unsafe codes (MSApp.execUnsafeLocalFunction(function(){...})), but using it, I have this problem with focus. To solve the problem I removed this script and I start wrapping unsafe codes on my libraries.

pgills commented 9 years ago

Are you seeing this behavior on Windows 8 or Windows 8.1?

mpedrazzi commented 9 years ago

On Windows 8.1

raulfelix commented 9 years ago

Hi @pgills,

I am facing the same issue with focus on an input field. I am using jquery-2.1.1, angular and running in a windows8.1 application. winstore-jscompat resolved the security warnings I was getting with jquery but other issues are popping up. This is only one of them. Would the recommended approach be to remove winstore-jscompat or is there another way to resolve this issue?

Thanks

herbertpimentel commented 9 years ago

Booooommmm, me too!!! @pgills,I hope you can fix it soon... will be amazing to run my app as a winapp without have to re code a lot of things.

pgills commented 9 years ago

@jayrenn can you look into this issue?

robophil commented 9 years ago

@jayrenn please a solution for this issue would be nice. Having something similar working with ionic which has angular as a dependency.

joshbuchea commented 9 years ago

Also seeing this issue in Ionic.