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

rangy.text() and range.findText() out of sync #184

Closed
timdown opened this issue Mar 23, 2014 · 3 comments
Closed

rangy.text() and range.findText() out of sync #184

timdown opened this issue Mar 23, 2014 · 3 comments

Comments

@timdown
Copy link
Owner

timdown commented Mar 23, 2014

From ben.get...@gmail.com on September 23, 2013 04:54:10

What steps will reproduce the problem? 1. view screencast: http://screencast.com/t/tSFbyiqbOGRt 2. Jeff Atwood's blog (as an example): http://www.codinghorror.com/blog/2013/03/why-ruby.html 3. Select a portion of the document that spans the first image and attempt to find the selected text.
4. Javascript:
var range = rangy.createRange(); range.selectNodeContents(document.body);
range.findText(rangy.getSelection().text()); What is the expected output? What do you see instead? I expect .text() and .findText() to work off the same system (maybe an unfair assumption?). What version of the product are you using? On what operating system? rangy v1.3alpha.772
Windows Vista SP2; Chrome latest Please provide any additional information below. I additionally tried removing all stylesheets from the page -- no difference. I've seen similar with other HTML pages as well, but I haven't found a common thread. Another example of a failed find() is selecting from above the initial blockquote into it (ex: "Discourse was: Why didn't you "). However, selecting from within the blockquote and out is fine.

Original issue: http://code.google.com/p/rangy/issues/detail?id=184

@timdown
Copy link
Owner Author

timdown commented Mar 23, 2014

From timd...@gmail.com on September 29, 2013 03:54:44

text() and findText() do use the same system, so this seems like a bug. I'll look into it.

Status: Accepted

@timdown
Copy link
Owner Author

timdown commented Mar 23, 2014

From timd...@gmail.com on February 24, 2014 16:00:25

There were a couple of issues with options being passed into findText(), now resolved.

Status: FixedInNextRelease

@timdown
Copy link
Owner Author

timdown commented Mar 23, 2014

From ben.get...@gmail.com on March 07, 2014 09:02:40

Great detective work. This looks good through my own testing too.

@timdown timdown closed this as completed Jul 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant