-
Notifications
You must be signed in to change notification settings - Fork 39
Add popover light dismiss integration #460
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
Open
josepharhar
wants to merge
7
commits into
w3c:gh-pages
Choose a base branch
from
josepharhar:popover
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fd18178
Add popover light dismiss integration
josepharhar 2286d66
remove target parameter
josepharhar 2524ba2
Merge remote-tracking branch 'upstream/gh-pages' into popover
josepharhar 146efd0
use click event instead of pointerdown and pointerup
josepharhar 5013123
reorder to use new algorithm
josepharhar 9a14194
pass more arguments to html
josepharhar fbc7da7
move light dismiss step into click handling
josepharhar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -899,6 +899,66 @@ <h4>Event dispatch</h4> | |
| <p>Otherwise (|event| is a <code>click</code> or <code>auxclick</code> event for which |userEvent| is a <code>pointerup</code> event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding <code>pointerdown</code> and <code>pointerup</code> targets in the DOM at the moment |event| is being dispatched.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>If |event| is a <code>click</code> event, then:</p> | ||
| <ol> | ||
| <li> | ||
| <p>Let |pointerDownTarget|, |pointerDownX|, |pointerDownY|, |pointerUpTarget|, |pointerUpX|, and |pointerUpY| each be null.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>If |event| had corresponding <code>pointerdown</code> and <code>pointerup</code> events preceding it, then:</p> | ||
| <ol> | ||
| <li> | ||
| <p>Set |pointerDownTarget| to the corresponding <code>pointerdown</code> event's event target.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerDownX| to the corresponding <code>pointerdown</code> event's <code>clientX</code>.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerDownY| to the corresponding <code>pointerdown</code> event's <code>clientY</code>.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerUpTarget| to the corresponding <code>pointerup</code> event's event target.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerUpX| to the corresponding <code>pointerup</code> event's <code>clientX</code>.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerUpY| to the corresponding <code>pointerup</code> event's <code>clientY</code>.</p> | ||
| </li> | ||
| </ol> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Otherwise:</p> | ||
| <ol> | ||
| <li> | ||
| <p>Set |pointerDownTarget| and |pointerUpTarget| to |event|'s event target.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerDownX| and |pointerUpX| to |event|'s <code>clientX</code>.</p> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p>Set |pointerDownY| and |pointerUpY| to |event|'s <code>clientY</code>.</p> | ||
| </li> | ||
| </ol> | ||
| </li> | ||
|
|
||
| <li> | ||
| <p><a href="https://html.spec.whatwg.org/#run-light-dismiss-activities">Run light dismiss activities</a> given |pointerDownTarget|, |pointerDownX|, |pointerDownY|, |pointerUpTarget|, |pointerUpX|, and |pointerUpY|.</p> | ||
| </li> | ||
| </ol> | ||
|
|
||
| </li> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be step 4. Now it is kind of outside the main algorithm
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I moved up the run light dismiss step. How does it look? |
||
|
|
||
| <li> | ||
| <p>Dispatch |event| to |target| following the [[UIEVENTS]] spec.</p> | ||
| <div class="note">If |userEvent| was captured, |event| is dispatched to the capturing target of |userEvent| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same {{PointerEvent/pointerId}} has been dispatched already.</div> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.