-
Notifications
You must be signed in to change notification settings - Fork 55
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
Find resets editor position upon closing #82
Comments
Bug confirmed, this should be fixed for 2.5. @videosmith, thank you for all the feedback. I found a quick workaround that should help you for now. The text found continues to be selected after the scroll jumps back to the start. This means you can go back to the found location by pressing the left or right arrow keys after closing the find tool. |
Thank you. That helps. FYI, I attempted to search for a few numbers on your sample script, received a 'specified text was not found' error - may not be able to locate numbered bullet points. Curiously, '5' was able to be located by the Find tool - possibly related to aq nearby Anchor attached? |
That curiosity is due to a property of HTML, which we can do nothing about. Lists can be ordered (numbered) or unordered (bullets). Ordered lists have their numbers added automatically by the browser and do not appear in search results, because the numbers are not a part of the document object model (DOM) being searched. When searching for 5, you're actually being shown the 5 from "Try pressing '5' now!", which is currently located at the 6th element of the list, thus giving the impression that Find takes you to list element number 5, but in reality it's showing element number 6, because search results are shown at the bottom of the page. Ordered lists are useful to prevent numbering errors when adding or removing elements. Unfortunately, they can't be searched for without having direct control over the browser's DOM parser (which is not possible on Imaginary Teleprompter) or using two separate DOM parsers and models with expensive to write, inefficient to run, and hard to maintain source code to keep them in sync. |
Understood and thanks for the clarification.
On Thursday, August 19, 2021, 04:45:59 PM EDT, Javier O. Cordero Pérez ***@***.***> wrote:
That curiosity is due to a property of HTML, which we can do nothing about. Lists can be ordered (numbered) or unordered (bullets). Ordered lists have their numbers added automatically by the browser and do not appear in search results, because the numbers are not a part of the document object model (DOM) being searched.
When searching for 5, you're actually being shown the 5 from "Try pressing '5' now!", which is currently located at the 6th element of the list, thus giving the impression that Find takes you to list element number 5, but in reality it's showing element number 6, because search results are shown at the bottom of the page.
Ordered lists are useful to prevent numbering errors when adding or removing elements. Unfortunately, they can't be searched for without having direct control over the browser's DOM parser or using two separate DOM parsers and models with expensive to write, inefficient to run, and hard to maintain source code to keep them in sync.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
When I click on the magnifying glass and search for text, the script updates to the selected text location, however when you close the the Find tool, the script resets to the top. Is there a way to maintain the script position after the Find tool is closed?
The text was updated successfully, but these errors were encountered: