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

Stop fullscreen viewing from destroying state boundaries #55

Closed
bkleeman opened this issue Nov 25, 2020 · 4 comments
Closed

Stop fullscreen viewing from destroying state boundaries #55

bkleeman opened this issue Nov 25, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bkleeman
Copy link
Collaborator

If you enter fullscreen mode in your browser, if state boundaries are active they will disappear. If they are not active, you won't be able to turn them on. If you exit fullscreen mode, you still can't see them. Oddly, this hasn't been observed in Safari yet. Just Chrome and Firefox.

Determine whether this has something to do with fullscreen mode compatibility (is that even a thing?), if it's destroying the canvas node in the DOM, or what is happening. Super weird.

@bkleeman bkleeman reopened this Nov 30, 2020
@bkleeman
Copy link
Collaborator Author

bkleeman commented Dec 3, 2020

Preliminary Analysis & Investigation:

Why would entering or exiting full screen mode in a web browser make an HTML5 canvas element visually disappear, without destroying or modifying it in the DOM and without raising any errors when the listener fires?

The <canvas> element still exists in the DOM, and the listener draw_state_boundaries() still fires and logs the object to the console. Doesn't matter if you press F11 or toggle it in the browser toolbar. If you load the page in standard view, turning on full screen makes the layer disappear. If you load the page in full screen mode, turning off full screen makes the layer disappear.

Is there something unique about the full screen API that would cause behavior like this? Or that would cause only one single element to just visually disappear?

Default load state, where the layer in question is turned on on load.

image

Immediately after entering full screen mode. DOM node still exists, checkbox is still checked, listener fires again as expected.3

image

Still able to log the canvas object to the console.

image

@bkleeman bkleeman assigned bkleeman and njmattes and unassigned bkleeman Dec 3, 2020
@bkleeman bkleeman added the bug Something isn't working label Dec 3, 2020
@bkleeman bkleeman added this to the December release milestone Dec 3, 2020
@bkleeman bkleeman pinned this issue Dec 3, 2020
@njmattes
Copy link
Contributor

njmattes commented Dec 4, 2020

I think this is a bug in Chrome actually. It looks to me like if we change the styling of the state borders so that they're solid and don't use the ctx.setLineDash() method, then they render fine (but they're ass ugly). The dashed lines render fine in Safari.

Thanks Google.

@bkleeman
Copy link
Collaborator Author

bkleeman commented Dec 7, 2020

Looks like this issue is happening in both Chrome and Firefox.
I also just found that opening dev tools (ctrl+shift+i) in both Chrome and Firefox causes the same issue.
In Chrome, same thing happens if you toggle your bookmarks bar (ctrl-shift-b).

I'm wondering if this is just an issue with a variety of less commonly used browser features?

@njmattes
Copy link
Contributor

njmattes commented Dec 8, 2020

For the time being I made state borders solid grey. I hate it, but I hate so much who cares anymore. Closing this.

@njmattes njmattes closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants