View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05849 | Bug reports | Other | public | 2012-02-24 05:39 | 2012-07-05 22:16 |
Reporter | TMSWhite | Assigned To | TMSWhite | ||
Priority | low | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92RC4 | ||||
Fixed in Version | 1.92+ | ||||
Summary | 05849: Unable to paste into numeric question types | ||||
Description | Can't paste into any numeric question type (or ones that use numbers_only or other_numbers_only advanced question options) | ||||
Steps To Reproduce | Tested in Git revision a59c50916d58af02be9584fa87905b42ba1ab0a8 Test with attached survey | ||||
Additional Information | This is also a problem with 1.91+ as of last SVN revision | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 12455 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql 5.3 | ||||
Server OS (if known) | Windows XP | ||||
Webserver software & version (if known) | XAMPP | ||||
PHP Version | 5.3 | ||||
Hello, Think of use numberlonly class to have a global js in survey_runtime.js. With maxlength i do this, and i can copy/paste. But numberlonly class are only for Yii .... |
|
I would suggest something like this: http://stackoverflow.com/a/3257682/974390 |
|
The "difficulty" is not for [0-9] an -, it's for . and , : langage specific. Maybe add a inline global var on the survey is the best solution. Denis |
|
Actually, I've already fixed the comma issue. And as part of that fix, it validates that the entry is a real number - so if you try to enter "1.2.3", or "-1,23,4-5", the field will be blanked onchange. Since that processing works, it may be fine to just remove the onkeyup function that only lets you enter numbers. If people enter non-numeric values, the field will be blanked and they will have to try again. Personally, I think that blanking a field may be safer than removing non-numeric values, since people may not notice that the field is shortened by a character (thus realizing they made a typo), but they'll certainly notice if the field gets blanked. |
|
I don't think that's ideal. Let's say you have a non-mandatory field in question by question mode. User enters 1,234 instead of the valid 1.234 and submits the page. I think validation while typing is the better choice. |
|
It's not blanked at submit - it is blanked onchange - so as soon as they tab off the field. The risk (as you say) is that if they press Next to submit without noticing the onchange event. Perhaps another option would be to force a re-focus on the field if it gets blanked by this process - that would prevent a submit until they entered a real number (or just left the field blank, which is OK if non mandatory) |
|
I like the later option better. |
|
We could certainly add a numbers_only validation option similar to the ones EM now manages and have the field show in pink. I had avoided that since there was also the onkeyup command; but we can move in this direction for a + release (unless you feel this needs to be addressed for 1.92 stable) |
|
That sounds good. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8873 |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8875 |
|
New 1.92+ version released. |
|
LimeSurvey: master e8d85779 2012-06-27 22:46:29 Details Diff |
Fixed issue 05849: Unable to paste into numeric question types Dev now can paste into any numeric type. Problem was goodchars() and onkeypress. Instead, remove bad characters during onkeyup (within fixnum_checkconditions()). Bad characters will display briefly then disappear. |
Affected Issues 05849 |
|
mod - admin/preview.php | Diff File | ||
mod - group.php | Diff File | ||
mod - qanda.php | Diff File | ||
mod - scripts/survey_runtime.js | Diff File | ||
LimeSurvey: Yii 558ccf4c 2012-06-28 23:06:32 Details Diff |
Fixed issue 05849: Unable to paste into numeric question types Dev now can paste into any numeric type. Problem was goodchars() and onkeypress. Instead, remove bad characters during onkeyup (within fixnum_checkconditions()). Bad characters will display briefly then disappear. |
Affected Issues 05849 |
|
mod - application/controllers/admin/question.php | Diff File | ||
mod - application/helpers/SurveyRuntimeHelper.php | Diff File | ||
mod - application/helpers/qanda_helper.php | Diff File | ||
mod - scripts/survey_runtime.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-24 05:39 | TMSWhite | New Issue | |
2012-02-24 05:39 | TMSWhite | File Added: ls2_comma_as_radix_separator.lss | |
2012-02-25 16:57 | DenisChenu | Note Added: 17631 | |
2012-03-02 15:36 | c_schmitz | Note Added: 17709 | |
2012-03-02 15:44 | DenisChenu | Note Added: 17712 | |
2012-03-02 16:04 | TMSWhite | Note Added: 17713 | |
2012-03-02 16:10 | c_schmitz | Note Added: 17716 | |
2012-03-02 16:17 | TMSWhite | Note Added: 17717 | |
2012-03-02 16:25 | c_schmitz | Note Added: 17718 | |
2012-03-02 16:26 | c_schmitz | Note Edited: 17718 | |
2012-03-02 16:32 | TMSWhite | Note Added: 17719 | |
2012-03-06 00:38 | c_schmitz | Assigned To | => TMSWhite |
2012-03-06 00:38 | c_schmitz | Status | new => assigned |
2012-03-06 00:38 | c_schmitz | Note Added: 17737 | |
2012-04-11 17:54 | TMSWhite | Project | Bug reports => Development |
2012-06-28 07:47 | TMSWhite | Changeset attached | => LimeSurvey master e8d85779 |
2012-06-28 07:47 | TMSWhite | Note Added: 19588 | |
2012-06-28 07:47 | TMSWhite | Resolution | open => fixed |
2012-06-28 07:49 | TMSWhite | Project | Development => Bug reports |
2012-06-28 07:49 | TMSWhite | Category | Survey taking => Other issues |
2012-06-28 07:50 | TMSWhite | Status | assigned => resolved |
2012-06-28 07:50 | TMSWhite | Fixed in Version | => 1.92+ |
2012-06-29 08:07 | TMSWhite | Changeset attached | => LimeSurvey Yii 558ccf4c |
2012-06-29 08:07 | TMSWhite | Note Added: 19590 | |
2012-07-05 22:16 | c_schmitz | Note Added: 19624 | |
2012-07-05 22:16 | c_schmitz | Status | resolved => closed |