Coder Social home page Coder Social logo

Comments (9)

dexonsmith avatar dexonsmith commented on September 4, 2024 1

I still didn't see anywhere where it was written that this was the case :(

@GreenAsJade, I looked it up in the Chromium sources to confirm @benjaminpjones's comment in the forum thread:

    public boolean performEditorAction(int actionCode) {
        if (!isValid()) return false;

        // If mTextInputAction has been specified (indicating an enterKeyHint
        // has been specified in the HTML) then we do will send the enter key
        // events. Otherwise we fallback to having the enter key move focus
        // between the elements.
        if (mTextInputAction == TextInputAction.DEFAULT) {
            switch (actionCode) {
                case EditorInfo.IME_ACTION_NEXT:
                    advanceFocusForIME(FocusType.FORWARD);
                    return true;
                case EditorInfo.IME_ACTION_PREVIOUS:
                    advanceFocusForIME(FocusType.BACKWARD);
                    return true;
            }
        }
        sendSyntheticKeyPress(
                KeyEvent.KEYCODE_ENTER,
                KeyEvent.FLAG_SOFT_KEYBOARD
                        | KeyEvent.FLAG_KEEP_TOUCH_MODE
                        | KeyEvent.FLAG_EDITOR_ACTION);
        return true;
    }

EDIT: seems to me that the logic of the Chromium change is:

  • If the developer is savvy enough to specify an intent for the enter key (enterkeyhint), trust the developer to handle input navigation for the form.
  • Else, turn on "smart go next" to avoid accidental early form submission in the common case.

The recent change that broke chat (60f5f4f0c78e55c46617bcbeccfce322c6730e88) is:

  • If there's no form, treat it as if there's one form for the whole page.

But it still defers to the developer if there's an intent specified via enterkeyhint, as shown above in the code snippet.

from online-go.com.

dexonsmith avatar dexonsmith commented on September 4, 2024

@GreenAsJade , any chance this was caused by #2595?

from online-go.com.

dexonsmith avatar dexonsmith commented on September 4, 2024

There's also some new thing you where you can see

Actually, probably not new (probably I just didn't notice it when it was flush right instead of taking up space in the chat box)

from online-go.com.

anoek avatar anoek commented on September 4, 2024

If you checkout the revision right before does it go away? Seems like a pretty likely candidate. I broke something with my mac so it'll be a little bit before I can look into it myself.

from online-go.com.

dexonsmith avatar dexonsmith commented on September 4, 2024

If you checkout the revision right before does it go away? Seems like a pretty likely candidate. I broke something with my mac so it'll be a little bit before I can look into it myself.

Confirmed:

I don't have time to try to fix myself right now (hopping on a call).

from online-go.com.

dexonsmith avatar dexonsmith commented on September 4, 2024

But my guess it's the <form> part of it, rather than the "...hint" thing (the latter of which sounded like a sufficient change to fix the bug)

from online-go.com.

GreenAsJade avatar GreenAsJade commented on September 4, 2024

he latter of which sounded like a sufficient change to fix the bug

I still didn't see anywhere where it was written that this was the case :(

I'm checking it out now.

from online-go.com.

dexonsmith avatar dexonsmith commented on September 4, 2024

I still didn't see anywhere where it was written that this was the case :(

Not sure what the ultimate source was, but I saw it here in the thread at https://forums.online-go.com/t/unable-to-reply-to-group-chat/49861/14:

It’s an implementation detail of Chromium/Android but this is what they’ve done:

  1. If there are multiple text inputs in a form, send a Tab event instead of Enter for all but the last input element
  2. If enterkeyhint is set, send Enter no matter what. (even if it’s enterkeyhint=“next” 🤔)

from online-go.com.

GreenAsJade avatar GreenAsJade commented on September 4, 2024

I've closed this because the change that caused this bug has been backed out

from online-go.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.