wickedest / Mergely

Merge and diff documents online
http://www.mergely.com
Other
1.17k stars 228 forks source link

Hide sidebar works for lhs sidebar only #77

Closed MacDisein closed 6 years ago

MacDisein commented 6 years ago

If I set „sidebar: false“ only the sidebar on the left hand side editor disappears.

wickedest commented 6 years ago

It sounds like you have some other kind of css issue. I cannot reproduce. Try reducing the problem, e.g. load one of the examples and disable the sidebar.

MacDisein commented 6 years ago

I used the simple sample - and I am able to reproduce it at jsfiddle: https://jsfiddle.net/bilgehansolo/142r02ny/

Maybe it depends on the jquery version.

wickedest commented 6 years ago

It hides both left and right sidebar: image

Note that it does not hide scrollbar.

MacDisein commented 6 years ago

Hmmm, not here, tried it with different browsers on different machines. b54c06f8-0257-43f1-b0a4-1ed64807cf94

wickedest commented 6 years ago

ipad? Safari? y, could be something like that.

MacDisein commented 6 years ago

The screenshot is from an iPad with Safari browser, but as described above, I can reproduce the problem with different browsers on different operating systems. After playing around with the jsfiddle demo a bit - I think I know what the reason is, the sidebar is not hidden if the option is set via "onLoad", if you change the option later (e.g. by clicking the button "Toggle line break") - the right sidebar disappears.

Steps to reproduce:

  1. Call the jsfiddle example => both sidebars are visible
  2. Add "sidebar: false," at line 17 in the "js" pane
  3. Click "Run" at the top left corner of the jsfiddle window => only the left sidebar becomes invisible
  4. Click the "Toggle line wrapping" button in the "result" pane => the right sidebar dissapears
MacDisein commented 6 years ago

As a workaround I do not set "sidebar" while creating the mergely object. I get and set the options later and then all sidebars are hidden as expected.

var options = $('#mergely').mergely('options'); options.sidebar = false; $('#mergely').mergely('options', options);

wickedest commented 6 years ago

Fixed in 4.0.2