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

[Firefox] [Chrome] Backspace behaviour is not consistent #41

Open
sdqali opened this issue Jul 24, 2013 · 4 comments
Open

[Firefox] [Chrome] Backspace behaviour is not consistent #41

sdqali opened this issue Jul 24, 2013 · 4 comments

Comments

@sdqali
Copy link
Contributor

sdqali commented Jul 24, 2013

When using backspace in most cases, the plugin does the right thing and continues to give suggestions for the remaining part of the word. This can be seen here:

Backspace working

In some cases, when you hit backspace, the suggestions stop showing up for the rest of the word. This can be seen here:

Backspace not working

This behavior can be reproduced on the in-browser editor offered by BitBucket.
I have not looked into what exactly is going wrong.

@navaneeth
Copy link
Member

Is this happening in both the addons? Or just chrome?

@sdqali
Copy link
Contributor Author

sdqali commented Jul 25, 2013

Both.
On Jul 24, 2013 8:31 PM, "Navaneeth.K.N" [email protected] wrote:

Is this happening in both the addons? Or just chrome?


Reply to this email directly or view it on GitHubhttps://github.com//issues/41#issuecomment-21531307
.

@navaneeth
Copy link
Member

I did a quick check. It looks like data-varnam-input-value attribute on the editor is not getting updated when pressing backspace. On other textareas it works well.

I have also noticed that Bitbucket is using Codemirror as the editor and codemirror may be intercepting some events.

@navaneeth
Copy link
Member

Try this,

  • Goto bitbucket edit page
  • Right click and inspect
  • In the JS console, try document.activeElement.value, you should see it is not giving full value. It is giving only the value for the current line. So because of this, hasTextChanged() method returns false causing no server requests and no suggestions.

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