diff app/assets/javascripts/application.coffee @ 405:26c1b0b8edbe

Don't add hash when clicking preview.
author nanaya <me@myconan.net>
date Sun, 06 Sep 2015 04:36:18 +0900
parents 3d434e15ddb1
children c4c8214fb0b2
line wrap: on
line diff
--- a/app/assets/javascripts/application.coffee	Sun Sep 06 04:35:11 2015 +0900
+++ b/app/assets/javascripts/application.coffee	Sun Sep 06 04:36:18 2015 +0900
@@ -53,7 +53,8 @@
   $mdBox.data "processed", true
 
 
-$(document).on "click", ".js-paste-preview-md", ->
+$(document).on "click", ".js-paste-preview-md", (e) ->
+  e.preventDefault()
   return if pasteText() == ""
   $(".js-paste-preview-md-box").html markdownfy(pasteText())
   $(".js-paste-preview-md-modal").modal "show"