Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Problem when editing an image #17

Closed
bmla opened this Issue · 7 comments

4 participants

@bmla

The problem is that if you have a scrollbar visible and do the following, the scrollbar will disappear.

1) Insert image
2) Click it, save
3) Click it again, save
4) Scrollbar gone

http://redactorjs.com/docs/examples/

Tested with Chrome 21, Firefox 14 and IE 9

EDIT:
If I remove this line https://github.com/dybskiy/redactor-js/blob/master/js/redactor/redactor.js#L2321 the scrollbar doesn't disappear.

@francisco-baptista

Hi @bmla,

I am having the same problem. Are you experiencing any side effects by deleting that line?

@bmla

I have not thoroughly tested it, but at first it does not seem to give any side effects. I have not looked into what observeImages() does, but I guess the call to that function was put there for a reason.

@francisco-baptista

Ok, I will feedback if we come across any side effects to that change. It also worries me that the core team did not reply to this report for more than 15 days.

Thanks @bmla

@bmla

@francisco-baptista I have written the developers and they will look at these issues.

@html5cat
Owner

@bmla @francisco-baptista , sorry to let you hang here with no response. I've put this project on GitHub a while back when it was open-source and clearly much easier accessible through GitHub. It has since grown into a commercial product so any support requests should be addressed here: http://redactorjs.com/

@bmla

@dybskiy Yes. I have contacted the developers at http://redactorjs.com/ and told them about the issues under this repo, and they said that they would take a look at them. But thank you for still maintaining this repository and giving us a place to point out issues :)

@opes

I know I'm a little late to the game on this one, but that line of code is not the one you want to comment out. The reason the scrollbar is getting hidden is because the overflow of the body is being set to "hidden" on this line:

https://github.com/dybskiy/redactor-js/blob/master/js/redactor/redactor.js#L2811

It has to do with the creation of the modal and locking the body into place when the modal is initialized. It should be completely safe to comment out that line.

Now, the line in my file that I used was actually 2914, so it may be different for you. Either way, the piece of code that you want to comment out is this one:

$(document.body).css('overflow', 'hidden');

What the side effect of this is that when the modal is visible, the page will still scroll instead of being locked into place.

Now, if you want to actually fix it to do what it is intended to do, you'll have to figure out why the line right before that isn't saving the initial overflow:

this.modalSaveBodyOveflow = $(document.body).css('overflow');

Could be do to scope or some other reason. I didn't get enough time to check it out to see why, but I'll report back when I get more time to look at it and see what the fix is.

Hope this helps!

@html5cat html5cat closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.