fix issue with flash message close button not working

the preventDefault function expects a function to be passed in to work correctly

fixes CNVS-12893

test plan:
  - as a teacher
    - create a quiz
    - turn on fabulous quizzes
    - view a quiz
    - click the menu and 'show student quiz results'
    - the flash message should appear
    - click on the x icon on the message
    - the message should close, and you should remain on the same page

  - try other variations that bring up this type of message at the top
  - clicking the close on them should work as well

Change-Id: Ia7e13e01c031d09b08ef6f6bdff9c0cf6f375396
Reviewed-on: https://gerrit.instructure.com/34999
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
This commit is contained in:
Derek DeVries 2014-05-15 13:37:08 -06:00
parent 246947a968
commit 059d36868f
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ define [
$buffer = $("#flash_message_buffer")
$holder = $("#flash_message_holder")
$screenreader_holder = $("#flash_screenreader_holder")
$holder.on 'click', '.close_link', preventDefault
$holder.on 'click', '.close_link', preventDefault(->)
$holder.on 'click', 'li', ->
$this = $(this)
return if $this.hasClass('no_close')