Giter Club home page Giter Club logo

Comments (3)

grokys avatar grokys commented on June 12, 2024

I suspect that "undo actions" in dispatch actions for a string may be a vestige from an older version of the spec for two reasons:

  • There is already an "undo actions" list in the form of the "input cancel list"
  • It's a map of "cluster" to "action" but "cluster" is never used (i.e. it's used as a simple list, not a map)
  • If we clear the "input cancel list" (instead of "undo actions") in "clear the modifier key state" this problem goes away

from webdriver.

ChernyshevDS avatar ChernyshevDS commented on June 12, 2024

@grokys Hello. I'm struggling with the same task as you trying to implement actions handling according to the spec, and I think the spec has a bigger flaw, that confused you and me regarding the input cancel list, and considering you spent your time scrutinizing the spec I'll be grateful for your feedback on my thoughts.

Any key down action (not only modifiers) dispatched with dispatch tick actions adds a key up action to input cancel list, which is global for all input state, not a particular input source. However, the only method to remove actions from this list is release actions. I beleive, dispatching a key up action should remove corresponding actions from input cancel list, otherwise we end up with a lot of duplicated key up actions on release actions. Same goes for pointer up actions.

Looking at the description of a dispatch actions for a string, we can see that undo actions hold only modifier keys state for a temporary key input source, created in element send keys, and these modifiers are cleared at the end of element send keys, so I do not agree with you that input cancel list may be used to clear modifiers state.

Adding to a confusion here: we have a global key state, which combines the state of possibly multiple key input sources, but it's not used during key events processing. Let's assume that we called perform actions with shift key down event. After the processing the input state contains one key input source with shift property set to true. Shouldn't this shift property be taken into account somehow if we call element send keys next? No idea...

from webdriver.

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.