Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Closing the tab changes the ui-router state to default state - 0.12.0 #3073

Closed
seenimurugan opened this issue Dec 9, 2014 · 9 comments
Closed

Comments

@seenimurugan
Copy link

My application is broken after i upgrade to 0.12.0 from 0.11.0. The issue is, If i close the tab, the state(ui-router) changes to the default state. It is hard to explain the problem, so i created the simple plunker @

http://plnkr.co/edit/Yigj4VR10zTAMG9DQo6C?p=preview

If you close any of the tab in the settings page then you are taken to the home page. I expect to stay on the settings page with the first tab being selected after closing the tab.

If you comment the 0.12.0 version in the plunker and un comment 0.11.0 version, then the application works as expected.

I think the issue is to do with the fix for the following bug -

#2763 (or)
/issues/2290.

There is no error message printed on the console so it is hard to identify the issue.

@seenimurugan seenimurugan changed the title Closing the tab changes the ui-router state to default state Closing the tab changes the ui-router state to default state - 0.12.0 Dec 9, 2014
@wesleycho
Copy link
Contributor

I was able to fix this behavior with $event.preventDefault() here.

@karianna
Copy link
Contributor

@wesleycho So should this be closed as a resolved via support?

@wesleycho
Copy link
Contributor

I would like more info first before closing.

@seenimurugan
Copy link
Author

Great. The solution works. Thanks a lot. But i feel this is bit of hack rather than a fix. Anyway thanks.

@chrisirhc
Copy link
Contributor

This is a bug with Angular 1.3.5 .
Plunker is working after upgrading to 1.3.13 :
http://plnkr.co/edit/EKBQZhz084WRfYPSJuDn?p=preview

@seenimurugan
Copy link
Author

Yes, it is working after angular upgrade. You are a star.

@pm98765
Copy link

pm98765 commented Nov 26, 2015

I am working with AngularJS 1.4.2 and UI-BootStrap 0.13.3 and issue is coming again. With the above solution of $event.preventDefault(), issue goes away. But is it a recommended solution?

@icfantv
Copy link
Contributor

icfantv commented Nov 26, 2015

I'm on my phone here so I can't easily check for sure. But if this is the issue I think it is and with the version you are using, yes, it is the recommended solution. The issue appears to be the use of anchor tags and how browsers are interpreting clicks on them. We've changed the template in master to use <div> instead which fixes that issue but does create an accessibility one. I can't easily find the issue numbers but they are there if you want to look.

@pm98765
Copy link

pm98765 commented Nov 27, 2015

Thanks @icfantv

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

No branches or pull requests

6 participants