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

fix for #18839: place.around() now works correct in fullscreen mode #117

Closed
wants to merge 1 commit into from
Closed

fix for #18839: place.around() now works correct in fullscreen mode #117

wants to merge 1 commit into from

Conversation

yurijmikhalevich
Copy link

@jquerybot
Copy link

Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA).

📝 Please visit http://contribute.jquery.org/CLA/ to sign.

After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know.


If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check.

@yurijmikhalevich
Copy link
Author

It also requires similar css-rule for popups to be displayed correctly over fullscreen divs. It is not in the commit, because I am not sure, whether applying this globally will break something in dojo or not. It looks like it shouldn't.

.dijitPopup {
    z-index: 2147483647 !important;
}

@wkeese
Copy link
Member

wkeese commented May 6, 2016

OK. Thanks for the patch. As I wrote in the ticket, if you can include a test case for when the current code is failing I'll look at it.

One other issue with your patch though is that https://developer.mozilla.org/en-US/docs/Web/API/Document/mozFullScreen says:

Note that the draft specification of the fullscreen API does not include a document.fullscreen attribute, and instead suggests checking whether document.fullscreenElement is non-null to determine whether the browser is in fullscreen mode. Using document.fullscreenElement to dertermine whether the browser is in fullscreen mode is recommend.

You seem to be violating that rule. (But again, I don't even understand what problem you are trying to fix, since the code seems to work in fullscreen mode for me already.)

@yurijmikhalevich
Copy link
Author

yurijmikhalevich commented May 7, 2016

@wkeese

Using document.fullscreenElement to dertermine whether the browser is in fullscreen mode is recommend.

I don't see how I am violating the rule. I am using document.fullscreenElement as the rule and examples says.

include a test case for when the current code is failing I'll look at it.

I will be able to send you an example on Tuesday.

Basically, this code will fail, if there is an aroud div inside a div in fullscreen mode with geometry like {1800, 732, 32, 32}, but one of fullscreen div's parents has {width: 800px, height: 600px} and located somewhere left on the page. This results in negative width and height anchor values after computing positions of visible parts of the anchor.

@wkeese
Copy link
Member

wkeese commented May 8, 2016

OK, I look forward to the test case.

About the MDN page, I was just worried because the MDN page says to "check whether document.fullscreenElement is non-null", but you are actually accessing the value. But I suppose that's OK.

@yurijmikhalevich
Copy link
Author

I was just worried because the MDN page says to "check whether document.fullscreenElement is non-null"

It looks for me that you took this wrong. It says, that there is no document.fullscreen (which should be a boolean indicating whether fullscreen is on/off) in standard. So it is better to check whether there is something or not in the document.fullscreenElement field if you need to check whether fullscreen mode is on/off. But, document.fullscreenElement is more than just boolean, it returns an element that is currently being presented in fullscreen mode. (https://developer.mozilla.org/en-US/docs/Web/API/Document/mozFullScreenElement)

So, the paragraph just recommends us to not use document.fullscreen, and I am not using it at all.

@yurijmikhalevich
Copy link
Author

yurijmikhalevich commented May 10, 2016

There is a bug demo source: https://pastebin.mozilla.org/8870456

Note, that it is reproducible in Chrome and in Opera, but not in FF.

http://prntscr.com/b2e27a
http://prntscr.com/b2e2bf

@wkeese
Copy link
Member

wkeese commented Jul 21, 2016

That https://pastebin.mozilla.org/8870456 example link doesn't work [anymore]. It would actually be ideal if you could add an automated test case to the pull request. Otherwise someone else will have to do it before accepting the PR.

You mentioned creating a CSS rule to set zIndex on dijitPopup nodes... but the popups' zIndex is currently controlled by dijit/popup. It starts at the _beginZIndex setting and then is incremented for each nested popup. If I set zIndex to 2147483647 (2^31 - 1) to start with, then it seems like I can't increment it for nested popups.

@dylans dylans added this to the 1.13 milestone Jan 16, 2017
@dylans
Copy link
Member

dylans commented Jan 16, 2017

@39dotyt would love to finally land this, but still waiting on an automated test.

Copy link
Member

@dylans dylans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs automated test per comments.

@dylans dylans modified the milestones: 1.13, 1.14 Feb 17, 2018
@dylans dylans modified the milestones: 1.14, 1.15 Aug 9, 2018
@dylans dylans modified the milestones: 1.15, 1.16.0 Feb 16, 2019
@msssk
Copy link
Contributor

msssk commented May 6, 2020

Closing this for extended inactivity and lack of a test case. Running Dijit's existing test file (dijit/tests/place.html) in full screen does not reveal any deficiencies.

@msssk msssk closed this May 6, 2020
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

Successfully merging this pull request may close these issues.

6 participants