Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: LayoutTests/fast/events/focus-querySelector-in-focus-event-handler.html

Issue 1312093002: Set focused flag earlier than dispatching focus events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: run with the fix Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/focus-querySelector-in-focus-event-handler-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <body>
esprehn 2015/08/25 07:50:19 I don't think you need the <body>
kochi 2015/08/25 08:04:34 Done.
4 <input type="text">
5 </body>
6 <script>
7 var input = document.querySelector('input');
8 input.addEventListener('focus', function(e) {
9 var focused = document.querySelector(':focus');
10 if (e.target === focused) {
11 testPassed(":focus matches event.target");
12 } else {
13 testFailed(":focus doesn't match event.target");
14 }
15 }, false);
16 input.focus();
17 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/focus-querySelector-in-focus-event-handler-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698