if(enabled)
view->EvalJavascript(kBackKeyEventScript);
if (!view->Backward()) {
- LOGGER(DEBUG) << "Terminate";
- Terminate();
+ if (view_stack_.size() == 1) {
+ LOGGER(DEBUG) << "Terminate";
+ Terminate();
+ } else {
+ RemoveWebViewFromStack(view_stack_.front());
+ }
}
}
return;
(app_data_->widget_info() != NULL &&
app_data_->widget_info()->view_modes() == "windowed")) {
if (!view->Backward()) {
- LOGGER(DEBUG) << "Terminate";
- Terminate();
+ if (view_stack_.size() == 1) {
+ LOGGER(DEBUG) << "Terminate";
+ Terminate();
+ } else {
+ RemoveWebViewFromStack(view_stack_.front());
+ }
}
}
} else if (enabled && kKeyNameMenu == keyname) {