jspsych / jsPsych

Create behavioral experiments in a browser using JavaScript
http://www.jspsych.org
MIT License
1.03k stars 668 forks source link

show_progress_bar doesn't show anything #230

Closed chanansh closed 8 years ago

chanansh commented 8 years ago

Hi, I added show_progress_bar: true in my init and I don't see any progress bar. What could be the root cause? CSS is added. Hanan

jodeleeuw commented 8 years ago

Can you provide more details about the experiment file? I just tested show_progress_bar: true and confirmed that it is working in a simple example, so there must be something about the particular experiment that is causing a problem.

chanansh commented 8 years ago

Sure, here you go:

counter_factual_new.zip

jodeleeuw commented 8 years ago

Haven't tried running this yet, but one idea occurred to me. It might be the result of not setting the display_element parameter in the init method. If that parameter is not set, then jsPsych defaults to using the <body> element as the display element. However, the progress bar is also shown inside the <body> element, so the plugins probably end up destroying the progress bar element inadvertently.

chanansh commented 8 years ago

solved! thanks. I think it should be noted in the documentation.

HS

On Mon, Feb 1, 2016 at 12:29 AM, Josh de Leeuw notifications@github.com wrote:

Haven't tried running this yet, but one idea occurred to me. It might be the result of not setting the display_element parameter in the init method. If that parameter is not set, then jsPsych defaults to using the

element as the display element. However, the progress bar is also shown inside the element, so the plugins probably end up destroying the progress bar element inadvertently. — Reply to this email directly or view it on GitHub https://github.com/jodeleeuw/jsPsych/issues/230#issuecomment-177640647.
jodeleeuw commented 8 years ago

Yep, I'll fix it so that it behaves better when display_element isn't set.