GithubHelp home page GithubHelp logo

Comments (7)

matthewp avatar matthewp commented on August 23, 2024

You use [ctrl-up] to unpress it. Not sure about [caps], I can't get that one to work either. Will write a test for this.

from syn.

matthewp avatar matthewp commented on August 23, 2024

What is your use case for needing [caps] by the way? If course if you want to type AAA you can do that yourself, is there some other reason why Syn needs to control it?

from syn.

matthewp avatar matthewp commented on August 23, 2024

The test I added passes, showing that [ctrl] works as expected.

from syn.

Tsvogh avatar Tsvogh commented on August 23, 2024

Hi, we are attempting to use FuncUnit to test our frontend and we are experiencing the same behaviour as the OP. I did not find what version of Syn is our FuncUnit using but our version of FuncUnit is not older than 3 weeks.
When I use:
var inputModuleTextArea = S(workflowsControl.getModuleTextarea()[0]); //just fetches the first input of specific class
inputModuleTextArea.type('[ctrl]a[ctrl-up][delete]'); //this deletes all text
inputModuleTextArea.type('Some sample text');
So far so good, but when I add next line:
inputModuleTextArea.type('[ctrl]z[ctrl-up]'); //our controller reacts to Ctrl+Z
it outputs this: Some sample textctrl

Other than that, typing [escape] instead of [ctrl]z[ctrl-up] also ends up like: Some sample textescape

We are already out of ideas. Has this been fixed or can you provide some solution or workaround if it hasn't, please?

from syn.

koalixCZ avatar koalixCZ commented on August 23, 2024

There is a problem in the file mouse.support.js - missing checkSupport function.

var syn = require('./synthetic');
require('./mouse');

if (!document.body) {
    syn.schedule(function () {
        checkSupport(syn);
    }, 1);
} else {
    window.__synthTest = function () {
        syn.support.linkHrefJS = true;
    };

In code is condition

syn.support.ready === 2

and this never occurs, because the scheduler is not able to invoke the code in the else branche. Solution is to encapsulate this code into the appropriate function:

if (!document.body) {
    syn.schedule(function () {
        checkSupport(syn);
    }, 1);
} else {
    checkSupport(syn);
}
function checkSupport(syn) {
    window.__synthTest = function () {
        syn.support.linkHrefJS = true;
    };

This seems works for me. I will try to fix it.

from syn.

kdillon avatar kdillon commented on August 23, 2024

I am working on this issue.

from syn.

kdillon avatar kdillon commented on August 23, 2024

This will be resolved in 0.4.3 the fix is already submitted

from syn.

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.