View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08590 | Bug reports | Conditions | public | 2014-01-24 13:16 | 2014-01-31 17:32 |
Reporter | w0928 | Assigned To | DenisChenu | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Fixed in Version | 2.05+ | ||||
Summary | 08590: Hidden questions appear when you tab to them, even if the conditions to show them haven't been met | ||||
Description | If you click anywhere on the screen and continually press the TAB key you can get hidden questions to appear when the focus shifts to the input which toggles the condition. | ||||
Steps To Reproduce | Create a survey with 2 radio button questions, question 1 and question 2. For question 1, make the answers "Yes", "No", and "N/A" (or whatever you would prefer. Make it so that question 2 will only be shown when the answer to question 1 is "No". Click on question 1 (or anywhere on the screen)... do not select anything for question 1. Just click on the screen. Now start pressing the tab key and watch as the focus shifts through the various parts of the form. When it gets to the "no" and you tab off of that question 2 will appear....even though the "NO" has not been selected. | ||||
Tags | No tags attached. | ||||
Attached Files | limesurvey_survey_475718.lss (16,157 bytes)
<?xml version="1.0" encoding="UTF-8"?> <document> <LimeSurveyDocType>Survey</LimeSurveyDocType> <DBVersion>164</DBVersion> <languages> <language>en</language> </languages> <answers> <fields> <fieldname>qid</fieldname> <fieldname>code</fieldname> <fieldname>answer</fieldname> <fieldname>sortorder</fieldname> <fieldname>language</fieldname> <fieldname>assessment_value</fieldname> <fieldname>scale_id</fieldname> </fields> <rows> <row> <qid><![CDATA[2695]]></qid> <code><![CDATA[1]]></code> <answer><![CDATA[Yes]]></answer> <sortorder><![CDATA[1]]></sortorder> <language><![CDATA[en]]></language> <assessment_value><![CDATA[0]]></assessment_value> <scale_id><![CDATA[0]]></scale_id> </row> <row> <qid><![CDATA[2695]]></qid> <code><![CDATA[0]]></code> <answer><![CDATA[No]]></answer> <sortorder><![CDATA[2]]></sortorder> <language><![CDATA[en]]></language> <assessment_value><![CDATA[1]]></assessment_value> <scale_id><![CDATA[0]]></scale_id> </row> </rows> </answers> <conditions> <fields> <fieldname>cid</fieldname> <fieldname>qid</fieldname> <fieldname>cqid</fieldname> <fieldname>cfieldname</fieldname> <fieldname>method</fieldname> <fieldname>value</fieldname> <fieldname>scenario</fieldname> </fields> <rows> <row> <cid><![CDATA[255]]></cid> <qid><![CDATA[2696]]></qid> <cqid><![CDATA[2695]]></cqid> <cfieldname><![CDATA[475718X144X2695]]></cfieldname> <method><![CDATA[==]]></method> <value><![CDATA[1]]></value> <scenario><![CDATA[1]]></scenario> </row> </rows> </conditions> <groups> <fields> <fieldname>gid</fieldname> <fieldname>sid</fieldname> <fieldname>group_name</fieldname> <fieldname>group_order</fieldname> <fieldname>description</fieldname> <fieldname>language</fieldname> <fieldname>randomization_group</fieldname> <fieldname>grelevance</fieldname> </fields> <rows> <row> <gid><![CDATA[144]]></gid> <sid><![CDATA[475718]]></sid> <group_name><![CDATA[section 1]]></group_name> <group_order><![CDATA[2]]></group_order> <description/> <language><![CDATA[en]]></language> <randomization_group/> <grelevance/> </row> </rows> </groups> <questions> <fields> <fieldname>qid</fieldname> <fieldname>parent_qid</fieldname> <fieldname>sid</fieldname> <fieldname>gid</fieldname> <fieldname>type</fieldname> <fieldname>title</fieldname> <fieldname>question</fieldname> <fieldname>preg</fieldname> <fieldname>help</fieldname> <fieldname>other</fieldname> <fieldname>mandatory</fieldname> <fieldname>question_order</fieldname> <fieldname>language</fieldname> <fieldname>scale_id</fieldname> <fieldname>same_default</fieldname> <fieldname>relevance</fieldname> </fields> <rows> <row> <qid><![CDATA[2695]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[475718]]></sid> <gid><![CDATA[144]]></gid> <type><![CDATA[L]]></type> <title><![CDATA[q1]]></title> <question><![CDATA[1. Do you like pie?]]></question> <preg/> <help/> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[2]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[1]]></relevance> </row> <row> <qid><![CDATA[2696]]></qid> <parent_qid><![CDATA[0]]></parent_qid> <sid><![CDATA[475718]]></sid> <gid><![CDATA[144]]></gid> <type><![CDATA[M]]></type> <title><![CDATA[q2]]></title> <question><![CDATA[2. Why not?]]></question> <preg/> <help/> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[3]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> <relevance><![CDATA[((475718X144X2695.NAOK == "1"))]]></relevance> </row> </rows> </questions> <subquestions> <fields> <fieldname>qid</fieldname> <fieldname>parent_qid</fieldname> <fieldname>sid</fieldname> <fieldname>gid</fieldname> <fieldname>type</fieldname> <fieldname>title</fieldname> <fieldname>question</fieldname> <fieldname>preg</fieldname> <fieldname>help</fieldname> <fieldname>other</fieldname> <fieldname>mandatory</fieldname> <fieldname>question_order</fieldname> <fieldname>language</fieldname> <fieldname>scale_id</fieldname> <fieldname>same_default</fieldname> <fieldname>relevance</fieldname> </fields> <rows> <row> <qid><![CDATA[2798]]></qid> <parent_qid><![CDATA[2696]]></parent_qid> <sid><![CDATA[475718]]></sid> <gid><![CDATA[144]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[1]]></title> <question><![CDATA[Prefer cake]]></question> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[1]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> </row> <row> <qid><![CDATA[2799]]></qid> <parent_qid><![CDATA[2696]]></parent_qid> <sid><![CDATA[475718]]></sid> <gid><![CDATA[144]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[2]]></title> <question><![CDATA[Prefer ice cream]]></question> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[2]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> </row> <row> <qid><![CDATA[2800]]></qid> <parent_qid><![CDATA[2696]]></parent_qid> <sid><![CDATA[475718]]></sid> <gid><![CDATA[144]]></gid> <type><![CDATA[T]]></type> <title><![CDATA[3]]></title> <question><![CDATA[Don't like sweets at all]]></question> <other><![CDATA[N]]></other> <mandatory><![CDATA[N]]></mandatory> <question_order><![CDATA[3]]></question_order> <language><![CDATA[en]]></language> <scale_id><![CDATA[0]]></scale_id> <same_default><![CDATA[0]]></same_default> </row> </rows> </subquestions> <surveys> <fields> <fieldname>sid</fieldname> <fieldname>admin</fieldname> <fieldname>expires</fieldname> <fieldname>startdate</fieldname> <fieldname>adminemail</fieldname> <fieldname>anonymized</fieldname> <fieldname>faxto</fieldname> <fieldname>format</fieldname> <fieldname>savetimings</fieldname> <fieldname>template</fieldname> <fieldname>language</fieldname> <fieldname>additional_languages</fieldname> <fieldname>datestamp</fieldname> <fieldname>usecookie</fieldname> <fieldname>allowregister</fieldname> <fieldname>allowsave</fieldname> <fieldname>autonumber_start</fieldname> <fieldname>autoredirect</fieldname> <fieldname>allowprev</fieldname> <fieldname>printanswers</fieldname> <fieldname>ipaddr</fieldname> <fieldname>refurl</fieldname> <fieldname>publicstatistics</fieldname> <fieldname>publicgraphs</fieldname> <fieldname>listpublic</fieldname> <fieldname>htmlemail</fieldname> <fieldname>sendconfirmation</fieldname> <fieldname>tokenanswerspersistence</fieldname> <fieldname>assessments</fieldname> <fieldname>usecaptcha</fieldname> <fieldname>usetokens</fieldname> <fieldname>bounce_email</fieldname> <fieldname>attributedescriptions</fieldname> <fieldname>emailresponseto</fieldname> <fieldname>emailnotificationto</fieldname> <fieldname>tokenlength</fieldname> <fieldname>showxquestions</fieldname> <fieldname>showgroupinfo</fieldname> <fieldname>shownoanswer</fieldname> <fieldname>showqnumcode</fieldname> <fieldname>bouncetime</fieldname> <fieldname>bounceprocessing</fieldname> <fieldname>bounceaccounttype</fieldname> <fieldname>bounceaccounthost</fieldname> <fieldname>bounceaccountpass</fieldname> <fieldname>bounceaccountencryption</fieldname> <fieldname>bounceaccountuser</fieldname> <fieldname>showwelcome</fieldname> <fieldname>showprogress</fieldname> <fieldname>allowjumps</fieldname> <fieldname>navigationdelay</fieldname> <fieldname>nokeyboard</fieldname> <fieldname>alloweditaftercompletion</fieldname> <fieldname>googleanalyticsstyle</fieldname> <fieldname>googleanalyticsapikey</fieldname> </fields> <rows> <row> <sid><![CDATA[475718]]></sid> <admin><![CDATA[Administrator]]></admin> <adminemail><![CDATA[howew@imsweb.com]]></adminemail> <anonymized><![CDATA[N]]></anonymized> <faxto/> <format><![CDATA[G]]></format> <savetimings><![CDATA[Y]]></savetimings> <template><![CDATA[basicnbccedp]]></template> <language><![CDATA[en]]></language> <additional_languages/> <datestamp><![CDATA[Y]]></datestamp> <usecookie><![CDATA[N]]></usecookie> <allowregister><![CDATA[N]]></allowregister> <allowsave><![CDATA[Y]]></allowsave> <autonumber_start><![CDATA[0]]></autonumber_start> <autoredirect><![CDATA[N]]></autoredirect> <allowprev><![CDATA[Y]]></allowprev> <printanswers><![CDATA[Y]]></printanswers> <ipaddr><![CDATA[N]]></ipaddr> <refurl><![CDATA[N]]></refurl> <publicstatistics><![CDATA[N]]></publicstatistics> <publicgraphs><![CDATA[N]]></publicgraphs> <listpublic><![CDATA[N]]></listpublic> <htmlemail><![CDATA[Y]]></htmlemail> <sendconfirmation><![CDATA[Y]]></sendconfirmation> <tokenanswerspersistence><![CDATA[Y]]></tokenanswerspersistence> <assessments><![CDATA[N]]></assessments> <usecaptcha><![CDATA[D]]></usecaptcha> <usetokens><![CDATA[N]]></usetokens> <bounce_email><![CDATA[howew@imsweb.com]]></bounce_email> <attributedescriptions><![CDATA[a:0:{}]]></attributedescriptions> <emailresponseto/> <emailnotificationto/> <tokenlength><![CDATA[15]]></tokenlength> <showxquestions><![CDATA[Y]]></showxquestions> <showgroupinfo><![CDATA[B]]></showgroupinfo> <shownoanswer><![CDATA[N]]></shownoanswer> <showqnumcode><![CDATA[X]]></showqnumcode> <bounceprocessing><![CDATA[N]]></bounceprocessing> <showwelcome><![CDATA[Y]]></showwelcome> <showprogress><![CDATA[Y]]></showprogress> <allowjumps><![CDATA[Y]]></allowjumps> <navigationdelay><![CDATA[0]]></navigationdelay> <nokeyboard><![CDATA[N]]></nokeyboard> <alloweditaftercompletion><![CDATA[Y]]></alloweditaftercompletion> <googleanalyticsstyle><![CDATA[0]]></googleanalyticsstyle> <googleanalyticsapikey/> </row> </rows> </surveys> <surveys_languagesettings> <fields> <fieldname>surveyls_survey_id</fieldname> <fieldname>surveyls_language</fieldname> <fieldname>surveyls_title</fieldname> <fieldname>surveyls_description</fieldname> <fieldname>surveyls_welcometext</fieldname> <fieldname>surveyls_endtext</fieldname> <fieldname>surveyls_url</fieldname> <fieldname>surveyls_urldescription</fieldname> <fieldname>surveyls_email_invite_subj</fieldname> <fieldname>surveyls_email_invite</fieldname> <fieldname>surveyls_email_remind_subj</fieldname> <fieldname>surveyls_email_remind</fieldname> <fieldname>surveyls_email_register_subj</fieldname> <fieldname>surveyls_email_register</fieldname> <fieldname>surveyls_email_confirm_subj</fieldname> <fieldname>surveyls_email_confirm</fieldname> <fieldname>surveyls_dateformat</fieldname> <fieldname>surveyls_attributecaptions</fieldname> <fieldname>email_admin_notification_subj</fieldname> <fieldname>email_admin_notification</fieldname> <fieldname>email_admin_responses_subj</fieldname> <fieldname>email_admin_responses</fieldname> <fieldname>surveyls_numberformat</fieldname> </fields> <rows> <row> <surveyls_survey_id><![CDATA[475718]]></surveyls_survey_id> <surveyls_language><![CDATA[en]]></surveyls_language> <surveyls_title><![CDATA[test survey]]></surveyls_title> <surveyls_description/> <surveyls_welcometext/> <surveyls_endtext/> <surveyls_url/> <surveyls_urldescription/> <surveyls_email_invite_subj><![CDATA[Invitation to participate in a survey]]></surveyls_email_invite_subj> <surveyls_email_invite><![CDATA[Dear {FIRSTNAME}, you have been invited to participate in a survey. The survey is titled: "{SURVEYNAME}" "{SURVEYDESCRIPTION}" To participate, please click on the link below. Sincerely, {ADMINNAME} ({ADMINEMAIL}) ---------------------------------------------- Click here to do the survey: {SURVEYURL} If you do not want to participate in this survey and don't want to receive any more invitations please click the following link: {OPTOUTURL} If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link: {OPTINURL}]]></surveyls_email_invite> <surveyls_email_remind_subj><![CDATA[Reminder to participate in a survey]]></surveyls_email_remind_subj> <surveyls_email_remind><![CDATA[Dear {FIRSTNAME}, Recently we invited you to participate in a survey. We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part. The survey is titled: "{SURVEYNAME}" "{SURVEYDESCRIPTION}" To participate, please click on the link below. Sincerely, {ADMINNAME} ({ADMINEMAIL}) ---------------------------------------------- Click here to do the survey: {SURVEYURL} If you do not want to participate in this survey and don't want to receive any more invitations please click the following link: {OPTOUTURL}]]></surveyls_email_remind> <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj> <surveyls_email_register><![CDATA[Dear {FIRSTNAME}, You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}. To complete this survey, click on the following URL: {SURVEYURL} If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]></surveyls_email_register> <surveyls_email_confirm_subj><![CDATA[Confirmation of your participation in our survey]]></surveyls_email_confirm_subj> <surveyls_email_confirm><![CDATA[Dear {FIRSTNAME}, this email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating. If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}. Sincerely, {ADMINNAME}]]></surveyls_email_confirm> <surveyls_dateformat><![CDATA[9]]></surveyls_dateformat> <surveyls_attributecaptions><![CDATA[a:0:{}]]></surveyls_attributecaptions> <email_admin_notification_subj><![CDATA[Response submission for survey {SURVEYNAME}]]></email_admin_notification_subj> <email_admin_notification><![CDATA[Hello, A new response was submitted for your survey '{SURVEYNAME}'. Click the following link to reload the survey: {RELOADURL} Click the following link to see the individual response: {VIEWRESPONSEURL} Click the following link to edit the individual response: {EDITRESPONSEURL} View statistics by clicking here: {STATISTICSURL}]]></email_admin_notification> <email_admin_responses_subj><![CDATA[Response submission for survey {SURVEYNAME} with results]]></email_admin_responses_subj> <email_admin_responses><![CDATA[Hello, A new response was submitted for your survey '{SURVEYNAME}'. Click the following link to reload the survey: {RELOADURL} Click the following link to see the individual response: {VIEWRESPONSEURL} Click the following link to edit the individual response: {EDITRESPONSEURL} View statistics by clicking here: {STATISTICSURL} The following answers were given by the participant: {ANSWERTABLE}]]></email_admin_responses> <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat> </row> </rows> </surveys_languagesettings> </document> | ||||
Bug heat | 12 | ||||
Complete LimeSurvey version number (& build) | 131206 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | IE, Chrome, Firefox (happens in all 3) | ||||
Database type & version | ?? | ||||
Server OS (if known) | Win7 | ||||
Webserver software & version (if known) | ?? | ||||
PHP Version | 5.2 | ||||
NOt a bug. When you press tab : you focus the radio button. And when you focus the radio button: you select the option. ANd : please lss file. |
|
But the option does not appear to be selected. None of the radio buttons are checked. Have you tried to reproduce? Basically you can get into a situation where you can answer question 2 but question 1 has not been answered at all. Is there a way to get around this? |
|
Uploaded an lss file that should reproduce the issue. Also, see the image. After I got the 2nd question to appear, without selecting any option I was able to then answer Yes to the first question...this should have hidden the 2nd question, no? |
|
OK, surely some event in jquery to add. Thanks :) |
|
Zut, It's not inline JS here sending the checkcondition. Somewhere else ????? But where ???? |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13767 |
|
Thomas: did you remind why you put LEMsetTabIndexes function ? Maybe specific on some situation or with some browser ? If you can put a lss file or give some situation where is needed, i think we can 'optimize' javascriot here. Thanks |
|
Denis- |
|
OK, For (1) we have to leave it for browser compatibility. It's work without with FF , think same for Chrome , surely some IE ... then ;) For (2) TAB press don't update radio or checkbox, then i really think we don't have to do here. If you find a browser/situation where it must be launch checkcondition function ? For (2) : Need to launch appropriate event, because here: it's don't test if it's numerci or nat. Review this. And think this part can be removed in 2.1 (remove all inline JS). Thank you |
|
http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13778 Use triggerHandler |
|
LimeSurvey 2-05+ Build 140131 released |
|
LimeSurvey: master 354980d5 2014-01-25 19:28 Details Diff |
Fixed issue 08590: Hidden questions appear when you tab to them, even if the conditions to show them haven't been met Dev: not sure LEMsetTabIndexes is still needed and more lauch checkconditions too Dev: TODO : Add a global function to remove all this checkconditions function see #07960 |
Affected Issues 08590 |
|
mod - scripts/expressions/em_javascript.js | Diff File | ||
LimeSurvey: master bdb63d0a 2014-01-26 17:52 Details Diff |
Dev: Launch checkcondition function according to question type Dev: 08590 child |
Affected Issues 08590 |
|
mod - scripts/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-24 13:16 | w0928 | New Issue | |
2014-01-24 18:16 | DenisChenu | Note Added: 28123 | |
2014-01-24 18:17 | DenisChenu | Note Edited: 28123 | |
2014-01-24 18:20 | w0928 | Note Added: 28124 | |
2014-01-24 18:27 | w0928 | Note Edited: 28124 | |
2014-01-24 18:29 | w0928 | Note Edited: 28124 | |
2014-01-24 18:54 | w0928 | File Added: limesurvey_survey_475718.lss | |
2014-01-24 18:54 | w0928 | File Added: bug.png | |
2014-01-24 18:55 | w0928 | Note Added: 28125 | |
2014-01-24 19:01 | w0928 | File Added: bug2.png | |
2014-01-24 19:05 | w0928 | Issue Monitored: w0928 | |
2014-01-25 12:44 | DenisChenu | Assigned To | => DenisChenu |
2014-01-25 12:44 | DenisChenu | Status | new => assigned |
2014-01-25 12:44 | DenisChenu | Note Added: 28135 | |
2014-01-25 18:21 | DenisChenu | Note Added: 28174 | |
2014-01-25 18:22 | DenisChenu | Note Edited: 28174 | |
2014-01-25 19:28 | DenisChenu | Changeset attached | => LimeSurvey master 354980d5 |
2014-01-25 19:28 | DenisChenu | Note Added: 28183 | |
2014-01-25 19:28 | DenisChenu | Resolution | open => fixed |
2014-01-25 19:31 | DenisChenu | Note Added: 28184 | |
2014-01-25 19:31 | DenisChenu | Assigned To | DenisChenu => TMSWhite |
2014-01-25 19:31 | DenisChenu | Status | assigned => feedback |
2014-01-25 19:31 | DenisChenu | Note Edited: 28184 | |
2014-01-25 19:31 | DenisChenu | Issue Monitored: DenisChenu | |
2014-01-26 17:07 | TMSWhite | Note Added: 28216 | |
2014-01-26 17:45 | DenisChenu | Note Added: 28218 | |
2014-01-26 17:46 | DenisChenu | Assigned To | TMSWhite => DenisChenu |
2014-01-26 17:46 | DenisChenu | Status | feedback => assigned |
2014-01-26 17:52 | DenisChenu | Changeset attached | => LimeSurvey master bdb63d0a |
2014-01-26 17:53 | DenisChenu | Note Added: 28219 | |
2014-01-26 17:53 | DenisChenu | Status | assigned => resolved |
2014-01-26 17:53 | DenisChenu | Fixed in Version | => 2.05+ |
2014-01-31 17:32 | c_schmitz | Note Added: 28349 | |
2014-01-31 17:32 | c_schmitz | Status | resolved => closed |
2021-08-02 17:21 | guest | Bug heat | 8 => 12 |