initialxy / cordova-plugin-themeablebrowser

Fork of org.apache.cordova.inappbrowser in an attempt to make it a bit more themeable and configurable to add some custom actions.
Apache License 2.0
294 stars 221 forks source link

Cannot goback in ios #154

Closed daoshenjay closed 6 years ago

daoshenjay commented 6 years ago

Hi,I open an angular2 page in the themeableBrowser(ios platform).And then I clicked a link goto another page.After that,back button is still gray in toolbar.So I cannot goto pre page by click it.

Angular2 goto another page by Anchor witch url like this: http://www.demo.com/#/secondpage

Any suggestion for me? Thanks!

daoshenjay commented 6 years ago

OK,I resolved this myself. 1.Added an observer: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(webViewHistoryDidChange:) name:@"WebHistoryItemChangedNotification" object:nil];

  1. Update buttons:
    • (void)webViewHistoryDidChange { [self updateButtons:self.webView]; }
daoshenjay commented 6 years ago

close this.

hiepxanh commented 6 years ago

hello mr @daoshenjay can you show me more detail where to add this? I'm facing the same issue and still cannot open the webpage