Bug 107429 - INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
Summary: INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element v...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 107427
  Show dependency treegraph
 
Reported: 2013-01-21 00:55 PST by Kent Tamura
Modified: 2013-01-21 04:52 PST (History)
5 users (show)

See Also:


Attachments
Patch (6.52 KB, patch)
2013-01-21 02:01 PST, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (6.92 KB, patch)
2013-01-21 02:29 PST, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2013-01-21 00:55:39 PST
INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
Comment 1 Kent Tamura 2013-01-21 02:01:09 PST
Created attachment 183737 [details]
Patch
Comment 2 Kentaro Hara 2013-01-21 02:26:01 PST
Comment on attachment 183737 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183737&action=review

> Source/WebCore/ChangeLog:20
> +        However we shoudl recalculate validity and call notifyFormStateChanged

Typo: should

> LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html:61
> +keyDown('7'); // -> 07:[--] --
> +keyDown('5'); // -> 07:[05] --
> +keyDown('6'); // -> 07:56 [--]
> +keyDown('A'); // -> 07:56 [AM]
>  shouldBeEqualToString('input.value', '07:56');
> +shouldBe('eventsCounter.input', '1');
> +shouldBe('eventsCounter.change', '1');

Sorry, would you elaborate on why the result becomes 1? (When are the events triggered?)

How about changing the test as follows to make it clear when the events are triggered?

eventCounters = {};
keyDown('7');
keyDown('5');
keyDown('6');
shouldBe('eventsCounter.input', '0');
shouldBe('eventsCounter.change', '0');
keyDown('A');
shouldBe('eventsCounter.input', '1');
shouldBe('eventsCounter.change', '1');

> LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html:122
> +shouldBe('eventsCounter.input', '1');
> +shouldBe('eventsCounter.change', '1');

Ditto.
Comment 3 Kent Tamura 2013-01-21 02:29:47 PST
Created attachment 183741 [details]
Patch 2
Comment 4 Kentaro Hara 2013-01-21 02:30:57 PST
Comment on attachment 183741 [details]
Patch 2

thanks
Comment 5 WebKit Review Bot 2013-01-21 04:51:58 PST
Comment on attachment 183741 [details]
Patch 2

Clearing flags on attachment: 183741

Committed r140324: <http://trac.webkit.org/changeset/140324>
Comment 6 WebKit Review Bot 2013-01-21 04:52:01 PST
All reviewed patches have been landed.  Closing bug.