Skip to content

Commit eba3de1

Browse files
authored
Fix link bug in Chrome (#1)
* Update testapp to works as FlightLogger * Fix Chrome bug
1 parent 997e506 commit eba3de1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

testapp/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ gem 'coffee-rails'
1313
gem 'uglifier'
1414
gem 'bootstrap-wysihtml5-rails', :path => '../'
1515
gem 'jquery-rails'
16-
gem 'bootstrap-sass'
16+
gem 'anjlab-bootstrap-rails', "~> 2.0.4.4", require: 'bootstrap-rails'

testapp/app/views/home/index.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
$('#some-textarea').wysihtml5({
1010
"font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
1111
"emphasis": true, //Italics, bold, etc. Default true
12-
"lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
13-
"html": true, //Button which allows you to edit the generated HTML. Default false
12+
"lists": false, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
13+
"html": false, //Button which allows you to edit the generated HTML. Default false
1414
"link": true, //Button to insert a link. Default true
15-
"image": true, //Button to insert an image. Default true,
16-
"color": true //Button to change color of font
15+
"image": false, //Button to insert an image. Default true,
16+
"color": false //Button to change color of font
1717
});
18-
</script>
18+
</script>

vendor/assets/javascripts/bootstrap-wysihtml5/core.js.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
var activeButton = $(this).hasClass("wysihtml5-command-active");
271271

272272
if (!activeButton) {
273-
self.editor.currentView.element.focus(false);
273+
self.editor.currentView.element.focus();
274274
caretBookmark = self.editor.composer.selection.getBookmark();
275275
insertImageModal.appendTo('body').modal('show');
276276
insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
@@ -332,7 +332,7 @@
332332
var activeButton = $(this).hasClass("wysihtml5-command-active");
333333

334334
if (!activeButton) {
335-
self.editor.currentView.element.focus(false);
335+
self.editor.currentView.element.focus();
336336
caretBookmark = self.editor.composer.selection.getBookmark();
337337
insertLinkModal.appendTo('body').modal('show');
338338
insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {

0 commit comments

Comments
 (0)