New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 663287 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
inactive
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Text editing cursor continues blinking even after the window focus is lost

Project Member Reported by yukawa@chromium.org, Nov 8 2016

Issue description

Version: 51.0.2704.90
OS: Android N NBD91K running on Nexus 6P

What steps will reproduce the problem?
(1) Flash Android N NBD91K into Nexus 6P
(2) Complete the setup wizard
(3) Open Chrome.
(4) Paste "data:text/html,<html><textarea></textarea></html>" on Omnibox and hit enter key.
(5) Tap the input area on the WebView to show the software keyboard.
(6) Long-tap the Recents button to start split screen mode.

What is the expected output?
Cursor on the Chrome should stop blinking in the step 6.

What do you see instead?
Cursor on the Chrome continues blinking in the step 6.

Please use labels and text to provide additional information.
See also b/31387944.  This is also reproducible on WebView.
Seems that built in EditText stops cursor blinking when it loses window focus.
 
b31387944_NBD91K_angler.mp4
5.8 MB View Download
b31387944_NBD91K_angler.zip
932 KB Download

Comment 1 by yuk...@google.com, Nov 8 2016

Components: -Blink>Compositing Blink>Editing>Selection
Removing Blink>Compositing as the cursor mark is not handled in compositing layer.  Adding  Blink>Editing>Selection instead.
Here is the repro steps for WebView case.
 1. Flash Android N NBD91K into Nexus 6P
 2. Complete the setup wizard.
 3. adb install -r crbug663287.apk
 4. adb shell am start -n org.chromium.bugs. issue663287 /.MainActivity
 5. Long-tap the Recents button to start split screen mode.
 6. Tap "START NEW ACTIVITY" button
 7. Focus in to the webview field in the upper window.
 8. Dismiss the software keyboard.
 9. Focus in to the webview field in the lower window.
10. Dismiss the software keyboard.

Expected behavior:
The cursor mark in the upper window stops blinking after the step 9.

Actual behavior:
At the step 10, two cursor marks are blinking, which seems weird.

====================
package org.chromium.bugs. issue663287 ;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final LinearLayout layout = new LinearLayout(this);
        layout.setOrientation(LinearLayout.VERTICAL);

        final Context context = this;
        final Button button = new Button(this);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                final Intent intent = new Intent(context, MainActivity.class)
                        .addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT)
                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                        .addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
                context.startActivity(intent);
            }
        });
        button.setText("Start new activity");

        layout.addView(button);
        final WebView webView = new WebView(this);
        webView.loadData("<html><body><textarea>webview</textarea></body></html>", "text/html", "utf8");
        layout.addView(webView);

        final EditText editText = new EditText(this);
        editText.setHint("editText");
        layout.addView(editText);

        setContentView(layout);
    }
}

crbug663287.apk
34.7 KB Download
crbug663287_NBD91K_angler.mp4
5.3 MB View Download
Cc: amaralp@chromium.org changwan@chromium.org
Components: -Mobile>WebView -Blink>Editing>Selection Blink>Focus
Owner: aelias@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by aelias@chromium.org, Aug 18 2017

Status: Fixed (was: Assigned)
No longer repro in Chrome 62.0.3188.0 (we landed many IME and selection changes since then).

Comment 5 by aelias@chromium.org, Aug 18 2017

Cc: mthiesse@chromium.org
FWIW, I think the fix patch was probably mthiesse@'s http://crrev.com/463390 "Focus/Blur contents when window focus changes"
Components: Blink>HTML>Focus
Components: -Blink>Focus

Sign in to add a comment