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

Only update position if document is showing #67

Closed
wants to merge 2 commits into from

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Mar 23, 2021

Closes #48

The following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

@marcoscaceres
Copy link
Member Author

Sent a patch to Gecko as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1653549

index.html Outdated
object</a>'s [=environment settings object / responsible
document=].
</li>
<li>If |document| is [=Document/visible=] and the <dfn>new
Copy link
Member Author

Choose a reason for hiding this comment

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

@reillyeon ... Alternative was just:

If |document| is [=Document/hidden=], return.

Though I feel this was more clear.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I'm going to flip it...

@marcoscaceres
Copy link
Member Author

I just realized that this is not enough... I'll update this and send again.

@marcoscaceres
Copy link
Member Author

Ok, did a deep dive and did some more testing. This requires a fairly hefty rewrite of the spec.

Basically, we need to wire up visibility change listeners for when the methods are called. All the timing stuff is also affected, because the position request happens after the document becomes visible again.

@marcoscaceres
Copy link
Member Author

will send again after rewrite...

@reillyeon
Copy link
Member

All the timing stuff is also affected, because the position request happens after the document becomes visible again.

Just for the record, Chromium doesn't implement the timing requirements around permissions but I think that should qualify as a bug as the requirements make sense.

@marcoscaceres
Copy link
Member Author

As part of exploring of adding this to Gecko, Edgar identified some inconsistency around how visibility is handled between Chrome and Safari... I'll report back once I have a better handle on what's going on.

@marcoscaceres marcoscaceres deleted the error_if_hidden branch February 10, 2022 02:44
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.

Require user activation to use API
2 participants