jquery-simulate-ext icon indicating copy to clipboard operation
jquery-simulate-ext copied to clipboard

Why is a non-current version of jquery.simulate.js being used?

Open brian-mann opened this issue 10 years ago • 2 comments

There is a bug in this method:

https://github.com/j-ulrich/jquery-simulate-ext/blob/master/libs/jquery.simulate.js#L23

.document is not reachable if you have cross-domain iframes in your document. The code should wrap this check in a try/catch in order to ensure .document is accessible.

However, after investigating this issue I was surprised to find that the libs/jquery.simulate.js is not using the current lib from https://github.com/jquery/jquery-simulate.

I noticed in the readme you mentioned that you have fixed several issues in the original library. Are those issues not resolved by using the latest version from the jquery team itself? Do I have to use your altered version, or can I use the latest version from them?

brian-mann avatar Oct 31 '14 18:10 brian-mann

At the time I started the plugin, jquery-simulate was not a project on its own but it was just a helper script in the jquery-ui project. Therefore, I copied it and made the necessary changes in the jquery-simulate-ext repository.

Meanwhile, they made a separate project for jquery-simulate and you are right that it should be checked whether the things I changed are already fixed there or whether the changes should be ported there.

Do I have to use your altered version, or can I use the latest version from them?

Depends on what you are doing with jquery-simulate-ext. Basically, there are two things which I changed in jquery.simulate.js:

  1. Fixed simulation within child iframes (see 5015de86bb0a2dc2c5d08b16d12392d5b64807d6)
  2. Added support for the "eventParams" option (see #12 and c3362623eaf7ffd17b892f9638f393b2c9b67f59)

So if you don't use one of those features, then chances are good that you can use the latest version from their project.

Despite all that: I saw that you are using jquery-simulate-ext quite actively in contrast to me in the last year. So the question is whether you are interested in maintaining the plugin? If you are interested, I could add you to the contributors list so you get full repo access. What do you think?

j-ulrich avatar Nov 06 '14 08:11 j-ulrich

Perhaps. I'm creating a testing framework which aims to mimic WebDriver without leaving your browser. To do this requires a heavy investment in simulating the right kinds of DOM events.

I think to take over this project I would have to manually merge the jquery-simulate and figure out what the differences are. I already have a list of things to add / change / fix, and I'm sure there would be plenty more, like adding mobile / touch events.

It might make more sense for me and the developers working on our project to either fork this and maintain our own version, or perhaps just change ownership of this repo. If not I will probably re-write it all from scratch because I am almost certain it's going to need a lot of new additional work.

brian-mann avatar Nov 10 '14 22:11 brian-mann