Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractSelectedText() behaviour differs between normal and minified JS #14

Closed
Pistos opened this issue Aug 31, 2015 · 3 comments
Closed

Comments

@Pistos
Copy link

Pistos commented Aug 31, 2015

With the minified JS, if you put the cursor in a <textarea>, and don't select anything, then issue $('textarea').extractSelectedText() in the browser console, it deletes the character before the cursor, as if you pressed backspace.

The -src.js file doesn't behave this way. The version of both files is allegedly 1.2.0.

Pistos pushed a commit to Libertree/libertree-frontend-ramaze that referenced this issue Aug 31, 2015
@timdown
Copy link
Owner

timdown commented Sep 1, 2015

I can't replicate this using the current source .js files in a slightly modified version of the demo page in Chrome or Firefox on my Mac. Which browser are you using?

@Pistos
Copy link
Author

Pistos commented Sep 1, 2015

Which browser are you using?

Chromium 43.0.2357.65 on Linux. I will try to come up with a minimal example. It's entirely possible that other code in our codebase was interfering.

@Pistos
Copy link
Author

Pistos commented Sep 1, 2015

You're right, in a minimal example, the problem does not manifest. It does appear in our code (I was able to reproduce it just now by swapping the minified and non-minified files), but I don't have time at the moment to try to more closely approximate the full situation (load all the other third-party libs, etc.). You are welcome to create an account here to try to reproduce the problem yourself. I couldn't quickly find how to replace a .js file loaded by a remote site, though. One possibility is with an HTTP proxy.

@Pistos Pistos closed this as completed Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants