View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05884Bug reportsTheme editorpublic2012-03-11 16:33
Reportermmirasol Assigned ToTMSWhite  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version1.92 
Summary05884: Question template adds 'style=display:block;' when top div is set to 'display:none'
Description

I recently discovered this after playing with the new 1.92 release. I made a copy of the default template and made a few changes to template.css and question.pstpl. Please see Steps to Reproduce.

I noticed in Version 1.92 Build 120303, style=display:block; is automatically added to the question div if it set to display:none, which I find strange.

To get around this, I created a new div within the top question div instead of modifying the top div directly.

Steps To Reproduce
  1. copy default template (copy_of_default).
  2. modify question.pstpl -- I added {QUESTION_CODE} to the classes. I intend to manipulate questions with jquery using the question code as reference.

<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS} {QUESTION_CODE}">

-- this works as expected, a6-other is displayed in the list of classes. see attached step2 image.

  1. modify template.css -- I added the code below to hide this question on purpose.

div.a6-other {
display:none;
}

-- to my surprise, it did the opposite. It added 'display:block;' to the question div. see attached step3 image.

TagsNo tags attached.
Attached Files
step2.jpg (70,905 bytes)   
step2.jpg (70,905 bytes)   
step3.jpg (88,382 bytes)   
step3.jpg (88,382 bytes)   
copy_of_default.zip (48,035 bytes)
Bug heat4
Complete LimeSurvey version number (& build)120303
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64)
Server OS (if known)2.6.35-32-server GNU/Linux Ubuntu Server x86
Webserver software & version (if known)Apache/2.2.16 (Ubuntu)
PHP VersionPHP 5.3.3-1ubuntu9.10
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

mmirasol

mmirasol

2012-03-07 11:24

reporter   ~17771

I attached the test survey with the template I used in the report.

mmirasol

mmirasol

2012-03-07 11:26

reporter   ~17772

sorry, I failed to mentioned that I created just one short text question for this test. anyway, I attached the survey as well.

TMSWhite

TMSWhite

2012-03-07 17:34

reporter   ~17779

Sorry, I can't reproduce this even using the examples you provide.

The is no PHP code that adds style="display:block"

The only thing that comes to mind is that when a question is relevant, we make a jQuery call to $(this).show(), and jQuery.show() behaviors similarly to doing $(this).css('display', 'block') (http://api.jquery.com/show/)

TMSWhite

TMSWhite

2012-03-11 00:16

reporter   ~17819

Since can't reproduce this, closing it.

Issue History

Date Modified Username Field Change
2012-03-07 11:21 mmirasol New Issue
2012-03-07 11:22 mmirasol File Added: step2.jpg
2012-03-07 11:22 mmirasol File Added: step3.jpg
2012-03-07 11:23 mmirasol File Added: limesurvey_survey_18418.lss
2012-03-07 11:24 mmirasol Note Added: 17771
2012-03-07 11:24 mmirasol File Added: copy_of_default.zip
2012-03-07 11:26 mmirasol Note Added: 17772
2012-03-07 16:51 c_schmitz Assigned To => c_schmitz
2012-03-07 16:51 c_schmitz Status new => assigned
2012-03-07 16:52 c_schmitz Assigned To c_schmitz => TMSWhite
2012-03-07 17:34 TMSWhite Note Added: 17779
2012-03-07 17:34 TMSWhite Status assigned => feedback
2012-03-11 00:16 TMSWhite Note Added: 17819
2012-03-11 00:16 TMSWhite Status feedback => resolved
2012-03-11 00:16 TMSWhite Resolution open => unable to reproduce
2012-03-11 16:33 c_schmitz Status resolved => closed
2015-12-11 14:40 c_schmitz Category Templates => Theme editor