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

Issue 205033004: Dispatch change and blur event for input type=text when window focus is changed (Closed)

Created:
6 years, 9 months ago by Habib Virji
Modified:
6 years, 8 months ago
Reviewers:
keishi, tkent
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Dispatch change and blur event for input type=text when window focus is changed FocusController::dispatchEventsOnWindowAndFocusedNode now dispatches setFocus(false) when window loses focus and setFocus(true) when window focus is back. R=tkent, keishi1 BUG=102830 TEST=Window focus is lost and text is updated by user, dispatch both blur and change event Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170511

Patch Set 1 #

Patch Set 2 : Moved dispatch change event to focus controller #

Patch Set 3 : Using HTMLFormControlElement instead of HTMLInputElement to check changes and dispatch change event #

Total comments: 1

Patch Set 4 : Using setFocus instead of dispatchChange mechanism #

Total comments: 15

Patch Set 5 : Removed toHTML conversion and added setFocus(true) for focus #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -0 lines) Patch
A LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/text/text-window-lost-focus-change-event-expected.txt View 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/page/FocusController.cpp View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Habib Virji
Dispatch change and blur event, if value is changed of the text and window focus ...
6 years, 9 months ago (2014-03-20 11:28:28 UTC) #1
tkent
Can we call Element::setFocus(false) in dispatchEventsOnWindowAndFocusedNode of FocusController.cpp? How other browsers work?
6 years, 9 months ago (2014-03-25 23:38:43 UTC) #2
Habib Virji
On 2014/03/25 23:38:43, tkent wrote: > Can we call Element::setFocus(false) in dispatchEventsOnWindowAndFocusedNode of > FocusController.cpp? ...
6 years, 9 months ago (2014-03-26 11:53:36 UTC) #3
Habib Virji
Updated to dispatch change event from FocusController. Did not use setFocus because had to use ...
6 years, 9 months ago (2014-03-26 16:26:39 UTC) #4
tkent
On 2014/03/26 11:53:36, Habib Virji wrote: > On 2014/03/25 23:38:43, tkent wrote: > > Can ...
6 years, 9 months ago (2014-03-27 00:44:54 UTC) #5
tkent
https://codereview.chromium.org/205033004/diff/60001/Source/core/page/FocusController.cpp File Source/core/page/FocusController.cpp (right): https://codereview.chromium.org/205033004/diff/60001/Source/core/page/FocusController.cpp#newcode49 Source/core/page/FocusController.cpp:49: #include "core/html/HTMLInputElement.h" I don't think adding dependency to a ...
6 years, 9 months ago (2014-03-27 00:46:03 UTC) #6
Habib Virji
Uploaded new patch. Yes that's true setFocus does work, it take care of checking if ...
6 years, 9 months ago (2014-03-27 17:10:38 UTC) #7
tkent
I checked behavior of Firefox and IE11. Suppose an element E has focus, then a ...
6 years, 8 months ago (2014-03-31 07:35:37 UTC) #8
tkent
https://codereview.chromium.org/205033004/diff/80001/LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html File LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html (right): https://codereview.chromium.org/205033004/diff/80001/LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html#newcode6 LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html:6: <input type='text' id='text'/> The quotation marks should be " ...
6 years, 8 months ago (2014-03-31 07:40:22 UTC) #9
Habib Virji
Thanks. Updated as per review comments. Did test setFocus is do working correctly. https://codereview.chromium.org/205033004/diff/80001/LayoutTests/fast/forms/text/text-window-lost-focus-change-event.html File ...
6 years, 8 months ago (2014-03-31 09:30:15 UTC) #10
tkent
please use try bots whenever you upload a new patch.
6 years, 8 months ago (2014-03-31 09:34:55 UTC) #11
tkent
lgtm
6 years, 8 months ago (2014-04-01 02:08:30 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/205033004/100001
6 years, 8 months ago (2014-04-01 02:08:31 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 02:51:58 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-01 02:52:01 UTC) #15
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 8 months ago (2014-04-01 02:59:38 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/205033004/100001
6 years, 8 months ago (2014-04-01 02:59:42 UTC) #17
commit-bot: I haz the power
6 years, 8 months ago (2014-04-01 03:58:24 UTC) #18
Message was sent while issue was closed.
Change committed as 170511

Powered by Google App Engine
This is Rietveld 408576698