ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Cannot click elements on the page after interceptor and redirected

Open Set2005 opened this issue 12 years ago • 6 comments

I am using interceptor in my angular code to check if the user is logged in, if not redirect to '/users/login' state. Its now successfully redirected using $state.go, but I cannot click or interact with my new page, this page got text field and buttons, and nothing happens when I click on them, I tested on Chrome browser with touch event which doesn't work, but if I refresh the page in Chrome it start to work again, And nothing works in my Android emulator.

My interceptor: https://gist.github.com/jianbo/5139946b9860e8f11846, Redirective page: https://gist.github.com/jianbo/0708694c2ad9b4dceb83

Set2005 avatar Apr 30 '14 11:04 Set2005

Which version of Ionic are you using?

adamdbradley avatar Apr 30 '14 14:04 adamdbradley

window.ionic = { controllers: {}, views: {}, version: '1.0.0-beta.1' };

Thanks

Set2005 avatar Apr 30 '14 21:04 Set2005

I downloaded '1.0.0-beta.3', still the same

Set2005 avatar Apr 30 '14 22:04 Set2005

The flow was when I clicked a link requires authentication, after went to that page I check for valid session, if intercept 401 then redirect to login page, so before I get redirected to login page, I landed on this page for a tiny second. So if this html page is empty (I deleted everything in html and empty controller code as place holder), there are no problem with my login page. If I put basic contents in this page like ion-view and ion-content, it would break my login page.

I think I will change how my authentication works so it doesn't land on the page when not yet authenticated. Not sure if this is a bug ?

Set2005 avatar Apr 30 '14 23:04 Set2005

I won't say there couldn't be any click errors with the new tap refactoring, but in this scenario I'm not sure how the click would come into play, especially since beta1 and beta3 use entirely different methods of removing the 300ms delay. Can you tell of touch events are even firing?

adamdbradley avatar May 01 '14 02:05 adamdbradley

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 06 '18 09:09 ionitron-bot[bot]