Adding content to page buggy on Firefox

Bug #1305481 reported by Olli Puurunen on 2014-04-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Son Nguyen
1.10
High
Son Nguyen
1.9
High
Unassigned

Bug Description

When adding a block by clicking an element from the content editor sidebar after a menu from the sidebar was expanded, the block gets added twice and the overlay doesn't go away.

Steps to reproduce:

1. Create a new page
2. Go to Edit content -tab
3. Expand a menu from the sidebar, for example Media
4. Click "Text box" from the sidebar
5. Click Save from the popup
6. Click Save from the "Text box: Configure" popup

Expected result:

The popup and the overlay disappears and the Text box block is added to page.

Actual result:

The popup disappears, but the overlay remains and the block is added twice to page.

In file js/views.js, the function ViewManager.makeNewBlocksDraggable is called on ViewManager initialization and also when the change event of the accordion is fired. So each div.blocktype gets a new click (and keydown) handler when the accordion is expanded and that's why ViewManager.startAddBlock is called multiple times and multiple overlays are created. We have made some customizations to views.js, but they don't seem to affect this part of the code.

Mahara version: Latest from git (1.9rc2dev)
Browser: Mozilla Firefox for Ubuntu (28.0)

Son Nguyen (ngson2000) wrote :

This also happens to Chromium

Changed in mahara:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Son Nguyen (ngson2000)
Son Nguyen (ngson2000) on 2014-04-10
Changed in mahara:
status: Confirmed → In Progress
Robert Lyon (robertl-9) wrote :

This seems to only happen for me if I pick an image or textbox block from within the accordian then choose the same one at the top (not in accordian).

Reviewed: https://reviews.mahara.org/3228
Committed: http://gitorious.org/mahara/mahara/commit/26263d6fe320d2883b29192fe1968acac5047e9c
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 26263d6fe320d2883b29192fe1968acac5047e9c
Author: Son Nguyen <email address hidden>
Date: Fri Apr 11 09:54:59 2014 +1200

Remove old event handlers for blocks in accordion (Bug #1305481)

Change-Id: Ic144660524e7ef0108989f8064b034740f3848a3
Signed-off-by: Son Nguyen <email address hidden>

Robert Lyon (robertl-9) on 2014-04-11
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw) on 2014-04-11
tags: added: regression

Reviewed: https://reviews.mahara.org/3240
Committed: http://gitorious.org/mahara/mahara/commit/b7551b324f9db36667905dfd6f90adc1ecbf34cd
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.9_STABLE

commit b7551b324f9db36667905dfd6f90adc1ecbf34cd
Author: Son Nguyen <email address hidden>
Date: Fri Apr 11 09:54:59 2014 +1200

Remove old event handlers for blocks in accordion (Bug #1305481)

Change-Id: Ic144660524e7ef0108989f8064b034740f3848a3
Signed-off-by: Son Nguyen <email address hidden>

Aaron Wells (u-aaronw) on 2014-10-20
Changed in mahara:
milestone: 1.10.0 → none
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers