From b2662bbdff8864e3c94dd96b76f01e8aa18781e1 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Wed, 25 Jun 2014 12:30:57 +0000 Subject: [PATCH] Allow tabbing responsive editor when not on mobile. fixes #3095 - Add `click` event to floatingheader --- core/client/components/gh-codemirror.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/client/components/gh-codemirror.js b/core/client/components/gh-codemirror.js index 013ae4de9a..b9637e614a 100644 --- a/core/client/components/gh-codemirror.js +++ b/core/client/components/gh-codemirror.js @@ -44,6 +44,12 @@ var Codemirror = Ember.TextArea.extend(MarkerManager, { afterRenderEvent: function () { var initMarkers = _.bind(this.initMarkers, this); + // Allow tabbing behaviour when viewing on small screen (not mobile) + $('.floatingheader').on('click', function () { + $('.entry-markdown').toggleClass('active'); + $('.entry-preview').toggleClass('active'); + }); + // replaces CodeMirror with TouchEditor only if we're on mobile mobileCodeMirror.createIfMobile();