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

Appearence of Suggested words menu causes page to scroll to top #8

Open
GoogleCodeExporter opened this issue Sep 15, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Place a spell checker on a text area that shows if the page is scrolled
down.
2. Run spell check to get a list of bad words
3. Choose a bad word to see its suggestions

What is the expected output? What do you see instead?
Expected: A list of suggested words appears without the page scrolling
Actual: The suggested words menu appears, but the page scrolls to the top.
I think it might be because the focushelper isnt nested inside of the
spellcheck div.

What version of the product are you using? On what operating system?
SVN Rev 134. OSX 10.5

Please provide any additional information below.
Tested in Firefox 3.5.8 on OSX, and IE7 on Windows XP SP3.

Original issue reported on code.google.com by sald...@gmail.com on 23 Feb 2010 at 6:41

@GoogleCodeExporter
Copy link
Author

thank you for letting me know about this, and i think you're right in saying 
it's
related to the focushelper. 
i will be looking into this and your other bug report this evening.

Original comment by willis...@gmail.com on 23 Feb 2010 at 7:17

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Cool man, thanks.

As a workaround, I disabled the statement (around line 151)
this.elements.$focusHelper.focus();

I believe that its fine for the user to just click 'ignore word' to make the 
menu
disappear, rather than have the menu disappear if the focus helper blurs.

Original comment by sald...@gmail.com on 23 Feb 2010 at 8:38

@GoogleCodeExporter
Copy link
Author

i had some display issues with using document.click to hide the suggestbox. for
example, on the main demo: http://spellchecker.jquery.badsyntax.co.uk/
if the suggest word box is showing, and you click on one of the tabs, the 
suggestbox
wouldn't dissappear as the tabs plugin would be preventing document.click from 
firing. 

this new input element is an experiment to see what i can do with the focus and 
blur
events, and i'd like to keep it if i can get it working properly lol 
i could also use anchors on the suggest words for focus and blur events..but 
this
input is easier to work with

Original comment by willis...@gmail.com on 23 Feb 2010 at 8:47

@GoogleCodeExporter
Copy link
Author

ok i've had a play and decided to revert this with r136

i couldn't find a way to prevent the browser from giving scrolling the viewport 
on
focus, and i guess it makes sense for it do that.
so i'm going to keep it as document.click for now until i find a better focus 
event
solution

Original comment by willis...@gmail.com on 23 Feb 2010 at 9:42

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