From e84534795667283cba56e36365221573b0727d24 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 2 Oct 2014 18:08:08 +0200 Subject: [PATCH] Improved selection of content editable file. --- .../javascripts/app/controllers/widget/text_module.js.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/widget/text_module.js.coffee b/app/assets/javascripts/app/controllers/widget/text_module.js.coffee index e3d8560f3..f2e16cc3e 100644 --- a/app/assets/javascripts/app/controllers/widget/text_module.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/text_module.js.coffee @@ -7,7 +7,10 @@ class App.WidgetTextModule extends App.Controller if @selector @bindElements = @$( @selector ).textmodule() else - @bindElements = @$('[contenteditable]').textmodule() + if @el.attr('contenteditable') + @bindElements = @el.textmodule() + else + @bindElements = @$('[contenteditable]').textmodule() @update() @subscribeId = App.TextModule.subscribe(@update, initFetch: true )