1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.26k stars 325 forks source link

chromium-vim causes text in omnibox to disappear #109

Closed ghost closed 10 years ago

ghost commented 10 years ago

I have a strange problem, which is very annoing.

How to reproduce(sometimes it requires several repeats to reproduce):

  1. Install chrome 38 beta and chromium-vim addon
  2. Navigate to a new tab
  3. Select omnibox
  4. Type some text or select suggestion
  5. Hit enter, and see text disappear.

If you do the same second time in the same tab, it then will work as intended(navigate or search).

I am pretty sure it is not an unstable browser issue, as I cannot reproduce it with addons disabled or in incognito window.

1995eaton commented 10 years ago

Yeah, I've definitely experienced this bug first-hand before. I've tried various fixes (including adding the compile.js file + compile scripts) but can't seem to resolve it. I Google'd around a bit and it seems to be a bug with Chrome, but cVim seems to be provoking the bug (I'm not entirely sure how, though). This issue is at the top of my to-do list for cVim, though. If you want to try changing your search engine in chrome://settings to something like "https://www.google.com/search?q=%s", I think that may resolve the issues (although you'll be stuck without search completions).

1995eaton commented 10 years ago

Here's some more info on the bug: https://code.google.com/p/chromium/issues/detail?id=389923

This is the URL of the blank page I'm getting: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8

ghost commented 10 years ago

I'm getting no url at all, just a blank omnibox.

ghost commented 10 years ago

What's the status? It is really VERY annoying

Jayphen commented 10 years ago

+1 I'm having the same issue.

1995eaton commented 10 years ago

Still trying to figure out the cause. I'm not having much luck though.

ghost commented 10 years ago

I have no experience in extension development, tough I have general javascript experience. Maybe, I could help? Could you point me where to start digging? May be we could find the trace somewhere with more eyes.

1995eaton commented 10 years ago

I was able to stop the issue by removing the content_scripts/mappings.js file (~1000 lines of code), which suggests that the large code size of the content scripts may have something to do with the problem. As it stands, there are 5327 lines of code in just the content scripts, so I think that if we could somehow reduce that code, the problems would disappear. This seems like it would be quite a big task, however.

1995eaton commented 10 years ago

@Baldrs, @Jayphen:

Try this commit, it totally fixed the omnibox problems for me. Hopefully it will for you, too.

Jayphen commented 10 years ago

:+1: Seems good now