Skip to content

Cannot enter the value ".5" in number cells #2279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
delavager opened this issue Dec 4, 2014 · 12 comments
Closed

Cannot enter the value ".5" in number cells #2279

delavager opened this issue Dec 4, 2014 · 12 comments

Comments

@delavager
Copy link

This is a little weird, but I tested it on the http://ui-grid.info/docs/#/tutorial/201_editable demo and it produces the same result in the "Age" column.

Basically I want to be able to enter the value ".5" without preceding it with a 0. If I, or a user, types "." nothing happens, no value is entered and no error. If I start with a 0 and type "0.5" it works fine. This is really silly but my users are just going to cry foul when they try and type ".5".

My set up is using the row editing feature and has enableCellEditOnFocus: true.
The columns have a cellFilter of 'number : 2' (which shouldn't matter as that only applies to the non-editable template) and are aggregated to a footer for a column total.

I also have a calculated column where each object has a function called "TotalCalc()" which aggregates 5 values across the row. At first I thought it was this, but removing the aggregations did not fix the problem.

Thanks.

@c0bra
Copy link
Contributor

c0bra commented Dec 5, 2014

Is this perhaps an HTML5 issue? Can you replicate with a number type input
outside of the grid?
On Dec 4, 2014 4:54 PM, "delavager" notifications@github.com wrote:

This is a little weird, but I tested it on the
http://ui-grid.info/docs/#/tutorial/201_editable demo and it produces the
same result in the "Age" column.

Basically I want to be able to enter the value ".5" without preceding it
with a 0. If I, or a user, types "." nothing happens, no value is entered
and no error. If I start with a 0 and type "0.5" it works fine. This is
really silly but my users are just going to cry foul when they try and type
".5".

My set up is using the row editing feature and has enableCellEditOnFocus:
true.
The columns have a cellFilter of 'number : 2' (which shouldn't matter as
that only applies to the non-editable template) and are aggregated to a
footer for a column total.

I also have a calculated column where each object has a function called
"TotalCalc()" which aggregates 5 values across the row. At first I thought
it was this, but removing the aggregations did not fix the problem.

Thanks.


Reply to this email directly or view it on GitHub
#2279.

@delavager
Copy link
Author

Both instances I tested this in weren't using html5 compatible browsers.

I haven't tried outside the grid, by number type I assume you mean one with a filter of number (I ask because ui-grid has a "type" attribute of number as well as a cellFilter).

@c0bra
Copy link
Contributor

c0bra commented Dec 9, 2014

By "number type" I mean <input type="number">.

Which specific browsers were you testing this with?

@PaulL1 PaulL1 added this to the 3.0 milestone Dec 10, 2014
@c0bra
Copy link
Contributor

c0bra commented Dec 29, 2014

No response in > 2 weeks. Closing.

@c0bra c0bra closed this as completed Dec 29, 2014
@delavager
Copy link
Author

I appreciate there wasn't a response, but the issue is still live and I provided an example on your demo site.

Specific browsers were IE 9, FF 24, Chrome 11 (I think it was 11). I used FF 24 to test your demo site provided in the issue specifically and got the same result each time.

@PaulL1
Copy link
Contributor

PaulL1 commented Dec 29, 2014

I have Safari 8.0.2 on OSX, and Chrome 39.0.2171.95 (64-bit) on OSX. Both of them are working fine. This gives a usability issue, but it's fundamentally a browser induced usability issue - presumably that behaviour would be the same for every number box rendered on that browser.

Given the relatively small usability impact, and the fact that the user could fix it by upgrading to a browser that handles it correctly, I'd say this is a relatively low priority to work around (we'd have to build a custom widget to avoid it).

@delavager
Copy link
Author

That's fair. Unfortunately where I'm using this the users do not have the option of upgrading browsers. Oh how I'd love to get to an html5 compatible IE. Is there something I can do as a work around per chance through jquery or something of the like?

@PaulL1
Copy link
Contributor

PaulL1 commented Dec 29, 2014

It's not really my area, but I'd guess the only way to fix it is a custom edit directive, with some other widget embedded (perhaps a bootstrap input directive instead)

@PaulL1
Copy link
Contributor

PaulL1 commented Jan 14, 2015

I think perhaps this could get rolled up into a bootstrap feature, refer #2290

@PaulL1 PaulL1 removed the type: bug label Jan 14, 2015
@PaulL1 PaulL1 modified the milestones: Future, 3.0 Mar 28, 2015
@PaulL1
Copy link
Contributor

PaulL1 commented May 27, 2015

Closing - this is a browser limitation not something ui-grid can fix. We have provided the ability to create custom editors with non-html5 widgets, which potentially would provide a way around this.

@PaulL1 PaulL1 closed this as completed May 27, 2015
@delavager
Copy link
Author

Is it a browser issue if it's happening with 3 different browsers on more than one persons machine?

Sent from my iPhone

On May 27, 2015, at 3:22 AM, Paul notifications@github.com wrote:

Closing - this is a browser limitation not something ui-grid can fix. We have provided the ability to create custom editors with non-html5 widgets, which potentially would provide a way around this.


Reply to this email directly or view it on GitHub.

@PaulL1
Copy link
Contributor

PaulL1 commented May 27, 2015

Yes. Some browsers don't support html5 widgets, and some browsers that do support html5 widgets don't allow entry of .5 when the entry type is number. It's a fault in the implementation of the widget within that browser (so it would obviously happen on more than one person's machine), and there's nothing we can do about it.

The best answer is to use a widget set other than html5 widgets, but we've made an active choice not to pick just one widget set - we'd prefer to be open to many, hence why we've allowed people to create custom editors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants