Commit Graph
38 Commits
Author SHA1 Message Date
Jessica Jong 56de53b473 Bug 1390794 - Use 'norolluponanchor' to avoid closing the picker when the anchored input box is clicked. r=mconley
Currently, we use 'noautohide' to avoid closing the picker when the anchored
input box is clicked. However, 'noautohide' does not work well on some Linux
distributions and noautohide panels behave differently to regular panels when
mousing over another window. So, 'nolluponanchor' is what we want here.

MozReview-Commit-ID: CfkufnbUw4v
2017-08-25 17:15:13 +08:00
Jessica Jong cd1ed7d0b3 Bug 1371111 - Open picker when input element's padding area is clicked. r=mconley
Currently, we listen to click events on the xbl binding; but actually we should
listen to click events on the input element itself, so that we get called when
the padding area is clicked.

MozReview-Commit-ID: 8NQKrxSXUyL
2017-08-17 20:33:00 -04:00
Rajesh Kathiriya fefc455410 Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G
2017-07-25 23:45:41 +05:30
Sebastian Hengst 1326418a49 Backed out changeset f5922a7ed25a (bug 1374620) for failing eslint at telemetry/tests/unit/test_TelemetrySend.js:358: ["os"] is better written in dot notation. r=backout 2017-07-31 14:44:34 +02:00
Rajesh Kathiriya 0d920ece6a Bug 1374620 - Enabled the ESLint dot-notation rule across mozilla-central r=standard8
MozReview-Commit-ID: FadrI2li43G
2017-07-25 23:45:41 +05:30
Zibi Braniecki 762b28fb77 Bug 1379905 - Switch mozIntl, datetimebox and DateTimeFormat to use GetRegionalPrefsLocales. r=jfkthame,smaug
MozReview-Commit-ID: IqGbT6ZUfuN
2017-07-14 16:47:23 -07:00
Jessica Jong d14eef00ce Bug 1374967 - Part 2: Consider step when deciding whether to show second/millisecond field. r=smaug
We should consider step and step base when deciding whether to show second and
millisecond field, since step and step base can affect the valid time intervals,
and the valid intervals may have second/millisecond part.

MozReview-Commit-ID: H4mJvLTvBOM
2017-06-29 11:47:00 -04:00
Jessica Jong 3aedcc0d5d Bug 1374967 - Part 1: Add helper functions to know if second/millisecond/day period exists. r=smaug
MozReview-Commit-ID: GDJW06IBaI2
2017-06-28 15:00:00 -04:00
Jessica Jong 508c171997 Bug 1372369 - Part 2: Set validity state to 'bad input' when the entered date value is invalid. r=smaug
If all fields in date/time input box are available but the input element's
value is empty, implies that it has been sanitized. In this case, we'll set the
'bad input' validity state. If any of the fields is cleared, we'll remove the
'bad input' validity state, as incomplete field does not imply 'bad input'.

MozReview-Commit-ID: 4EBpH5CWqXM
2017-06-19 01:13:00 -04:00
Jessica Jong 4c8f007035 Bug 1372369 - Part 1: Update input element's value when all fields are available and let DOM HTMLInputElement sanitize it. r=smaug
In this patch, we change it so that we always set the input element's value
once all fields are available and let DOM HTMLInputElement sanitize it. The
value after sanitization is not updated in the displayed input box, but may
display an error message (this will be done in Part 2) if needed.
Also, when any of the field's value is deleted, we will set input element's
value back to the empty string, so that a value is not accidentally submitted.

MozReview-Commit-ID: 9NAL8UlkoBK
2017-06-16 02:09:00 -04:00
Jessica Jong d59420a913 Bug 1371121 - [DateTimeInput] Remove activeElement check in blur event handler. r=smaug
In the original code, we check if input element is still the
document.activeElement in blur event handler, if so, we do nothing and early
return.
This check is not necessary, since it's not possible to refocus an element
during a blur. It also breaks the case of date/time input being in an iframe,
since when the iframe loses focus, the activeElement in the iframe is still the
date/time input, so we behave incorrectly after that.

MozReview-Commit-ID: 4matbsfxC0A
2017-06-14 02:06:00 -04:00
Carsten "Tomcat" Book 83daed97a1 Merge mozilla-central to mozilla-inbound 2017-06-14 14:50:11 +02:00
Jessica Jong fe51256000 Bug 1370858 - Fire change/input events after selecting a date/time from picker. r=smaug
Per spec [1], date/time inputs fall into this category:

"For input elements without a defined input activation behavior, but to which
 these events apply, and for which the user interface involves an explicit
 commit action but no intermediate manipulation, then any time the user commits
 a change to the element's value, the user agent must queue a task to first fire
 an event named input at the input element, with the bubbles attribute
 initialized to true, and then fire an event named change at the input element,
 with the bubbles attribute initialized to true."

So, we fire input/change events when:
- User selects a date/time from the picker
- User changes the value using up/down keys in a already complete date/time
  value
- User changes the value using the number keyboard in a already complete
  date/time value
- User clears the value (using reset button or using backspace)


MozReview-Commit-ID: E7Jc5qMKZj4
2017-06-12 02:21:00 +02:00
Rajesh Kathiriya 7c0507b30e Bug 1370232 - Enabled the ESLint no-unneeded-ternary rule across mozilla-central. r=standard8
MozReview-Commit-ID: AH9ArRkjh78
2017-06-13 00:23:54 +05:30
Jessica Jong eea8ef2546 Bug 1366620 - Use unicode-bidi: embed to fix reversed hebrew placeholders. r=gandalf
MozReview-Commit-ID: 1tTkps8a96N
2017-06-02 10:16:22 +08:00
Jessica Jong 5c0316c589 Bug 1337830 - [DateTimeInput] Home/End keys should have no effect on year field. r=mossop
MozReview-Commit-ID: LjYetlucSnT
2017-05-19 14:55:39 +08:00
Jessica Jong 6d6919a6e7 Bug 1318339 - [DateTimeInput] Prevent reset button from getting focus. r=mossop
Reset button should not be tabbable or focusable.

MozReview-Commit-ID: IboMKl3n0LY
2017-04-21 17:35:43 +08:00
Jessica Jong b47d720978 Bug 1301310 - Hide input date/time picker only when input element blurs. r=mossop
If we rely on XUL panel's default behavior, the picker is hidden and opened
again when we jump from one inner field to another with a mouse click, this is
because XUL pannel gets hidden when user clicks outside it with
noautohide=false. In order to avoid this, we should close it explicitly only
when input element blurs.

MozReview-Commit-ID: GxPxd0wPWgM
2017-04-20 15:04:10 +08:00
Jessica Jong b668a5e487 Bug 1320227 - [DateTimeInput] Localize placeholders for <input type=date>. r=mossop
MozReview-Commit-ID: Bn0xjuuVhgU
2017-04-11 15:24:23 +08:00
Jessica Jong 25b328a566 Bug 1346085 - Part 3: RTL support for date/time input box. r=gandalf,mossop
Set the .dir property of the input box wrapper to `rtl` if this is a RTL
locale.

MozReview-Commit-ID: D2qJVjvzxNW
2017-04-05 15:02:37 +08:00
Jessica Jong 100fa585bf Bug 1346085 - Part 2: Set input element's focus state when inner fields are focused/blurred. r=smaug
Since the inner fields of date/time input are now <span> instead of <input>
text, we are adding an API for binding code to set the focus state of the
bound input element when inner fields are focused/blurred.

MozReview-Commit-ID: 9wvu57xT6HZ
2017-04-05 15:02:30 +08:00
Jessica Jong 3fea189cdd Bug 1346085 - Part 1: Use <span> for editable fields in date/time input box. r=mossop
When adding support for RTL in date/time input box, we noticed that bidi text
was not displayed properly with mixed of inline and block elements. By
changing our editabled fields from <input> to <span>, we can rely on bidi
algorithm and markups to display the inner fields in the right order.

MozReview-Commit-ID: 7r8OVSJXJRU
2017-04-05 15:00:13 +08:00
Jessica Jong 5ecfc283af Bug 1344624 - [DateTimeInput] (l10n) Part 2: Display formatted numbers in <input type=date>. r=mossop
MozReview-Commit-ID: BOaNefKe2Pb
2017-03-24 11:13:26 +08:00
Jessica Jong 7c58493ec0 Bug 1344624 - [DateTimeInput] (l10n) Part 1: Display formatted numbers in <input type=time>. r=mossop
Add a new attribute "rawValue" in each of the numeric fields. We store the
non-formatted number in this attribute, and display formatted number using
Intl.NumberFormat.

MozReview-Commit-ID: JkcBObFoYQ3
2017-03-24 11:13:20 +08:00
Jessica Jong 706e823fc6 Bug 1347069 - [DateTimeInput] (l10n) 12/24hr format for <input type=time> based on locale. r=mossop
MozReview-Commit-ID: 1QJig3ZTV7R
2017-03-21 11:11:10 +08:00
Jessica Jong 27957d382c Bug 1301312 - Part 5: Handle input element's attribute change explicitly. r=smaug
MozReview-Commit-ID: AswWoeGasXZ
2017-03-15 11:39:02 +08:00
Jessica Jong 6406d154de Bug 1301312 - Part 4: Order fields in <input type=date> based on locale datetime format. r=gandalf,mconley
MozReview-Commit-ID: 42WjAsLImc6
2017-03-06 14:45:14 +08:00
Jessica Jong cd81238b7a Bug 1301312 - Part 3: Order fields in <input type=time> based on locale datetime format. r=gandalf,mconley
MozReview-Commit-ID: ALgurGjv3d0
2017-03-06 14:44:22 +08:00
Jessica Jong a2e018fff5 Bug 1301312 - Part 2: Localize placeholders for <input type=time>. r=mconley
Use entities declared in DTD files so that lozalizers can fill in appropiate
placeholders for each locale.

MozReview-Commit-ID: 9KODExaDnDe
2017-03-06 14:43:23 +08:00
Jessica Jong 1aa8217bd1 Bug 1301312 - Part 1: Localize AM/PM strings for <input type=time>. r=gandalf,mconley
MozReview-Commit-ID: 2QycAbnHmHv
2017-03-06 14:43:12 +08:00
Mark Banner 703aa9e231 Bug 1341029 - Turn on the ESLint no-undef rule for all of toolkit/. r=jaws
MozReview-Commit-ID: Ed9FfkskDos
2017-02-20 11:45:58 +00:00
Jessica Jong aee4d30469 Bug 1318317 - [DateTimeInput] hide reset button when there is no value. r=mconley 2017-01-24 17:19:00 +01:00
Jared Wein 601c1e5636 Bug 1331661 - Manually fix the remaining 'quotes' errors for eslint. r=Gijs
MozReview-Commit-ID: 7iXjQtp9ftV
2017-01-17 10:38:58 -06:00
Jessica Jong 498334b443 Bug 1320225 - [DateTimeInput] Integration of input type=date input box with picker (part 1). r=mconley,smaug 2017-01-17 13:09:03 +08:00
Jessica Jong 98eb9e529a Bug 1286182 - Implement the layout for <input type=date>. r=mconley,smaug 2016-12-19 00:50:00 +08:00
Jessica Jong 2b193656de Bug 1314544 - Allow keyboard shortcut when focus is on date/time input box. r=mconley 2016-11-16 23:16:00 +01:00
Jessica Jong 2e526dfa30 Bug 1314542 - Verify millisecond field when setting input time elemet's value. r=mconley 2016-11-04 00:59:00 -04:00
Jessica Jong 113984eb02 Bug 1288591 - Implement the layout for <input type=time>. r=mconley, r=dholbert, r=smaug 2016-10-06 00:17:00 -04:00