| Index: ios/web/navigation/navigation_manager_impl.mm
|
| diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm
|
| index e86102b314481a4d5bb6dfed6b60922e1377a89f..76c725a58af237405744da86159b7e5860c8fa17 100644
|
| --- a/ios/web/navigation/navigation_manager_impl.mm
|
| +++ b/ios/web/navigation/navigation_manager_impl.mm
|
| @@ -344,9 +344,10 @@ int NavigationManagerImpl::GetIndexForOffset(int offset) const {
|
| : static_cast<int>([session_controller_ pendingEntryIndex]);
|
|
|
| if (offset < 0) {
|
| - if (GetTransientItem()) {
|
| - // Going back from transient item is a matter of discarding it and there
|
| - // is no need to move navigation index back.
|
| + if (GetTransientItem() && [session_controller_ pendingEntryIndex] == -1) {
|
| + // Going back from transient item that added to the end navigation stack
|
| + // is a matter of discarding it as there is no need to move navigation
|
| + // index back.
|
| offset++;
|
| }
|
|
|
|
|