Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Saka isn't reliably focused on Firefox #8

Open
eejdoowad opened this issue Nov 17, 2017 · 6 comments
Open

Saka isn't reliably focused on Firefox #8

eejdoowad opened this issue Nov 17, 2017 · 6 comments

Comments

@eejdoowad
Copy link
Member

No description provided.

@3v1n0
Copy link

3v1n0 commented Dec 15, 2017

True... One example is when you first Ctrl+L to higlight the tab bar, then you hit the saka combination, that won't move the focous to saka input field.

@azzamsa
Copy link

azzamsa commented Mar 27, 2018

Sure. so many feature missing.

@pureooze pureooze added the bug label Apr 3, 2018
@pureooze
Copy link
Member

So I have looked into this and it does not seem easy to fix. In particular, when we are dealing with trying to take focus away from the omnibar, it seems like the browser itself will prevent an extension from doing this. There is a workaround involving a hacky solution where the extension deletes the existing tab and clones it into a new instance of the tab. I would prefer to solve this using a more elegant solution than that but it does not seem to be easy to accomplish.

I'm going to instead try and focus on scenarios where the user is simply focused on an input inside a webpage (ex. the search on github) and then opens Saka.

@kimjson
Copy link

kimjson commented Jan 26, 2019

How about using windows.create api instread of injecting <iframe> or creating new tab to toggle saka?

Like this:

  var w = WIDTH;
  var h = HEIGHT;
  var left = (screen.width / 2) - (w / 2);
  var top = (screen.height / 2) - (h / 2);

  browser.windows.create({
    'url': '/saka.html',
    'type': 'popup',
    'width': w,
    'height': h,
    'left': left,
    'top': top
  });

2019-01-26 6 10 16

What's good:

  • Reliable focus
  • Simpler toggleSaka() logic (just store saka on off state globally and use it to determine open/close action, maybe it's better to introduce redux.)
  • Better looking than as is in some cases: open a new tab and then show saka overlay

What's bad:

  • Additional titlebar appears in popup window which is not needed.
  • Additional popup animation.

If this popup solution is acceptable, I'll work on it and create PR.

@pureooze
Copy link
Member

Hi @steinkim, thanks for looking into this. I'm not sure how I feel about using a popup like this. On the one hand it does address some issues we have but at the same time I really don't like seeing the title bar.

@kimjson
Copy link

kimjson commented Jan 29, 2019

@pureooze https://chrome.google.com/webstore/detail/searchbar/fjefgkhmchopegjeicnblodnidbammed
I'm trying manipulating chrome extension default popup location like this chrome extension(after work).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants