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:
parent
d0e70501fb
commit
1ce2a12818
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
var Markdown = Ember.Component.extend({
|
var Markdown = Ember.Component.extend({
|
||||||
adjustScrollPosition: function () {
|
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
|
// calculate absolute scroll position from percentage
|
||||||
scrollPixel = scrollWrapper.scrollHeight * this.get('scrollPosition');
|
scrollPixel = scrollWrapper.scrollHeight * this.get('scrollPosition');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue