From 6760c19b9004de430a666511430a161d0dcd89fa Mon Sep 17 00:00:00 2001 From: cnguyen Date: Sat, 26 Oct 2019 19:54:30 -0700 Subject: [PATCH 1/4] Update index.js --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index 873179a..79830e7 100644 --- a/index.js +++ b/index.js @@ -301,6 +301,7 @@ function processQueryParams() { } } + function start() { processQueryParams(); if (window.location.hash) { @@ -334,4 +335,13 @@ window.addEventListener("beforeunload", function (e) { return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc. }); + +editor.on('change',function() +{ +editor.getScrollInfo(); +editor.scrollTo(editor.left,editor.bottom+50); +}) + + + start(); From 5408b25868222ee51dfd786f6f4ad070b0394f71 Mon Sep 17 00:00:00 2001 From: cnguyen Date: Sun, 27 Oct 2019 12:12:39 -0700 Subject: [PATCH 2/4] fixed patting fixed patting --- index.css | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.css b/index.css index f2e9793..7717cf2 100644 --- a/index.css +++ b/index.css @@ -30,7 +30,7 @@ } .CodeMirror-scroll { - padding: 30px; + padding: 50px; box-sizing: border-box; } diff --git a/index.js b/index.js index 79830e7..34484f9 100644 --- a/index.js +++ b/index.js @@ -339,7 +339,7 @@ window.addEventListener("beforeunload", function (e) { editor.on('change',function() { editor.getScrollInfo(); -editor.scrollTo(editor.left,editor.bottom+50); +editor.scrollTo(editor.left,editor.bottom); }) From 81467fcb90fd7b3f99490893aaa5cc00e7d9da56 Mon Sep 17 00:00:00 2001 From: cnguyen Date: Sun, 27 Oct 2019 15:45:28 -0700 Subject: [PATCH 3/4] Create changelog3.md --- changelog3.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 changelog3.md diff --git a/changelog3.md b/changelog3.md new file mode 100644 index 0000000..b0b0af2 --- /dev/null +++ b/changelog3.md @@ -0,0 +1,15 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +## 2019-10-28 + +### Added +- + +### Changed +- fixed padding on cm-scroll changed from 30 to 50pxx + +### Fixed + +- fix scrolling somewhat. Addresses issue [#112](https://github.com/jbt/markdown-editor/issues/112). From 0b457ba3cc4a194f5a928e586df9f39741c89d9b Mon Sep 17 00:00:00 2001 From: cnguyen Date: Sun, 27 Oct 2019 21:26:49 -0700 Subject: [PATCH 4/4] cypress --- cypress.json | 1 + cypress/fixtures/example.json | 5 +++++ cypress/plugins/index.js | 17 +++++++++++++++++ cypress/support/commands.js | 25 +++++++++++++++++++++++++ cypress/support/index.js | 20 ++++++++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 cypress.json create mode 100644 cypress/fixtures/example.json create mode 100644 cypress/plugins/index.js create mode 100644 cypress/support/commands.js create mode 100644 cypress/support/index.js diff --git a/cypress.json b/cypress.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/cypress.json @@ -0,0 +1 @@ +{} diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 0000000..da18d93 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} \ No newline at end of file diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js new file mode 100644 index 0000000..fd170fb --- /dev/null +++ b/cypress/plugins/index.js @@ -0,0 +1,17 @@ +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +module.exports = (on, config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/cypress/support/commands.js b/cypress/support/commands.js new file mode 100644 index 0000000..ca4d256 --- /dev/null +++ b/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add("login", (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/cypress/support/index.js b/cypress/support/index.js new file mode 100644 index 0000000..d68db96 --- /dev/null +++ b/cypress/support/index.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands')