Rob--W / cookie-manager

Cookie Manager for Firefox (Desktop/Android), Chrome. Supports viewing and editing of cookies and private cookies.
Mozilla Public License 2.0
105 stars 24 forks source link

Does not accept seconds in timestamp #14

Closed Grossdm closed 6 years ago

Grossdm commented 6 years ago

I've noticed that when editing a cookie, the addon doesn't accept a timestamp that includes seconds which are in the native format.

It's a small annoyance. I assume that the browser just sets the timestamp to :00 seconds.

Rob--W commented 6 years ago

I tried to have consistent behavior across platforms, and the date picker on Firefox mobile did not have a seconds field.

On desktop, Firefox does not natively support a date picker, and I show a simple set of input fields as a fall back. I will add another input field to allow seconds to be set, on desktop Firefox.

Grossdm commented 6 years ago

I don't know if this would help, but I think I ran across a preference in about:config that might have turned on/off date/time selectors for input fields. There were several prefs for input fields, IIRC.

Rob--W commented 6 years ago

Firefox desktop does not support datetime-local inputs yet: https://bugzilla.mozilla.org/show_bug.cgi?id=888320

(Since Firefox 57, separate date / time inputs are supported though)

As said before, Firefox for Android does support a native date picker. Perhaps I can detect that the seconds is 0 and separately prompt for the desired number seconds.

Grossdm commented 6 years ago

You are clearly on top of the developments in Firefoxs' APIs.

I'll withhold further coding "suggestions" unless I'm quite confident of the information.

:+1:

Rob--W commented 6 years ago

Until you made your comment I did not know about the date/time inputs on desktop. I only found it after looking up bugs (BMO) and documentation (MDN).

If you think that you might have a useful suggestion, don't hesitate posting new issues or comments. The worst that can happen is that we deepen our knowledge.

Thanks for your original report and follow-up comments. They were useful!

Grossdm commented 6 years ago

You are welcome!

Update: I just started noticing on my phone that when I tap a time field, I get two "inputs" for the date and time!

One is what I'm familiar seeing, and it looks like a native Firefox input.

Just underneath that, there is a new input. It looks more like it is part of the addon.

Rob--W commented 6 years ago

@Grossdm I haven't changed anything in my add-on. I think that you're mistaking the new year input in Firefox 62 for a separate field.

Before Firefox 62, it was difficult to change the year via the input (requiring the user to flip through all months, manually... this was a pain). As of Firefox 62, there is a separate input field to set the year: https://bugzilla.mozilla.org/show_bug.cgi?id=1318046

Rob--W commented 6 years ago

I am working on a patch for Firefox to support seconds in the timepicker on Android: https://bugzilla.mozilla.org/show_bug.cgi?id=1498787

If the patches are approved soon, then it will be in Firefox 64. Otherwise it will be in Firefox 65.