Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

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

Open
mpedrazzi opened this issue Nov 18, 2014 · 9 comments
Open

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

mpedrazzi opened this issue Nov 18, 2014 · 9 comments

Comments

@mpedrazzi
Copy link

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
Copy link

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
Copy link
Author

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
Copy link
Contributor

pgills commented Nov 19, 2014

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

@mpedrazzi
Copy link
Author

On Windows 8.1

@mpedrazzi mpedrazzi changed the title Problem with the focus of a input type text whem click on it Problem with the focus of a input type text when click on it Nov 24, 2014
@raulfelix
Copy link

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
Copy link

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 pgills assigned pgills and jayrenn and unassigned pgills Dec 17, 2014
@pgills
Copy link
Contributor

pgills commented Dec 17, 2014

@jayrenn can you look into this issue?

@robophil
Copy link

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

@joshbuchea
Copy link

Also seeing this issue in Ionic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants