0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

fix mirrored scrolling in markdown editor

issue #2426
- ember markdown component now looks for preview element as a DOM ancestor rather than a descendent
This commit is contained in:
David Arvelo 2014-05-22 18:23:02 -04:00
parent d0e70501fb
commit 1ce2a12818

View file

@ -1,6 +1,6 @@
var Markdown = Ember.Component.extend({
adjustScrollPosition: function () {
var scrollWrapper = this.$('.entry-preview-content').get(0),
var scrollWrapper = this.$().closest('.entry-preview-content').get(0),
// calculate absolute scroll position from percentage
scrollPixel = scrollWrapper.scrollHeight * this.get('scrollPosition');