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

Buttons don't lose focus on fullscreen #22

Open
aferriss opened this issue Feb 28, 2017 · 8 comments
Open

Buttons don't lose focus on fullscreen #22

aferriss opened this issue Feb 28, 2017 · 8 comments

Comments

@aferriss
Copy link

I'm using the onmousedown property to call canvas.webkitRequestFullScreen(), however after I exit from fullscreen, the full screen button still has it's focus. Clicking any other widget will call the onmousedown event again, returning me to fullscreen. I solved this turning off focus again in the event handler.

   fullScreenBtn = new iFace.Button({
      bounds: [0,0.45,0.998, 0.1],
      label: 'Fullscreen',
      mode: 'contact',
      onmousedown: function (){
        this.hasFocus = false; 
        canvas.webkitRequestFullScreen();
      }
    });
@aferriss
Copy link
Author

aferriss commented Mar 3, 2017

Actually I've noticed this is a problem with some other widgets as well. For instance if I click and hold on a slider/crossfader to change its value and my mouse is outside of it's bounds when I release, the onmouseup event never fires.

@TVoorend
Copy link

TVoorend commented Mar 3, 2017 via email

@aferriss
Copy link
Author

aferriss commented Mar 3, 2017

@TVoorend Not sure how you ended up getting that notification. Was trying to reach the repo author @charlieroberts

@TVoorend
Copy link

TVoorend commented Mar 3, 2017 via email

@charlieroberts
Copy link
Owner

Gillis,

Ted "watched" notifications about this repo, which is why you're receiving emails. To stop receiving them, just "unwatch" the repo.

@aferriss Which branch of interface.js are you using? The v2 branch is the one currently under development that probably works the best.

@aferriss
Copy link
Author

aferriss commented Mar 3, 2017

@charlieroberts I'm using master, is it much behind v2?

@charlieroberts
Copy link
Owner

It's ahead in some ways, behind in others. v2 is basically a complete rewrite, almost from scratch. It's better engineered and it should be easier to fix problems as they pop-up. But v2 is behind in terms of implementing some of the widgets, and way behind in terms of documentation.

Right now v2 has Button, Slider, MultiButton, MultiSlider, Knob, Joystick, and Menu. If you'd like to try it but need another one of the widgets implemented let me know... that'd be a good excuse for me to dive into working on it again. Best way to get a feel for it is to look in the examples folder.

@aferriss
Copy link
Author

aferriss commented Mar 3, 2017

@charlieroberts Ah good to know! Unfortunately I've been tweaking the master branch quite a bit to suit my needs to moving everything over might be a bit more than I am ready to chew at the moment. I'd need the range and crossfader widgets as well.

Thanks for all your work on the library though! It seems to work great aside from these small things. Excited to see v2 when it comes out! :D

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

3 participants