New Webview added to view stack when coming from background

オープン
#4,981 コメント 15 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, javascript, typescript
領域
mobile

調査の方向性

app/main-page.js にあるリンク先の再現アプリから始め、バックグラウンド移行とアプリ再オープンの手順に従って、tns run android を使用してライフサイクルを再現します。アプリがバックグラウンドから復帰したときの Android webview の動作を追跡します。完了条件は、アプリを再オープンしても既存の webview の上に空の webview が追加されないことです。

索引モデルが issue の本文から書いたものです。

説明

backlog os: android

I've wrote a small app that has a webview to illustrate the issue: https://github.com/surdu/TestBkg

In the onload method of that webview I have implemented a quick mechanism to change the webview's src only the first time the onload method is called, just to illustrate better the problem.

To reproduce the problem we follow these steps:

  1. launch the app on Android using tns run android. We notice the app load NS' website.
  2. put the app in background by pressing the home button
  3. bring back the app by pressing the app icon on the phone

On the last step is where the problem is: a new blank webview is added on top of the old one (if we press the back button on the phone, the old webview will be revealed).

Now let's consider a second scenario. After completing the above scenario, we kill the app by pressing the Overview button and close our app from there (by swipe or by pressing the X button).

Now, if we replace the step 1 by just opening the app from the phone (NOT by running tns run android) and then go through the same steps, we'll notice that at step 3 the behaviour changes: now we will be correctly presented with the old webview.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

主要言語
TypeScript
スター
25.7k
フォーク
1.7k
平均マージ
1日 5時間
マージ済み PR(30日)
35

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/NativeScript のほかの issue

NativeScript/NativeScript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。