Commit 04ef3ddc authored by Ciro Santilli's avatar Ciro Santilli

Improve zen mode internals.

parent ac516abe
class @ZenMode
@fullscreen_prefix = 'fullscreen_'
@ESC = 27
constructor: ->
@active_zen_area = null
@active_checkbox = null
$('body').on 'change', '.zennable input[type=checkbox]', (e) =>
checkbox = e.currentTarget;
checkbox = e.currentTarget
if checkbox.checked
Mousetrap.pause()
@udpateActiveZenArea(checkbox)
......@@ -15,8 +14,7 @@ class @ZenMode
@exitZenMode()
$(document).on 'keydown', (e) =>
console.log("esc")
if e.keyCode is ZenMode.ESC
if e.keyCode is $.ui.keyCode.ESCAPE
@exitZenMode()
$(window).on 'hashchange', @updateZenModeFromLocationHash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment