mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 13:30:03 +00:00
Fix editor incorrect scroll (#1525)
## Launch Checklist - Fixes #1524 The problem is that the editor at the end of the layer editor view is forcing some scrolling due to a different bug that was solved. - #1492 which was solved in PR: #1501 The previous fix was in oder to solve issues in the code editor which has all the style in it, and a search-and-replace operation is used to change the content, so there was a need to introduce the previous fix. The current solution is to scroll the view only for the code editor using a react prop, which is `false` by default. - [x] Briefly describe the changes in this PR. - [x] Link to related issues. - [ ] Write tests for all new functionality. - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
This commit is contained in:
@@ -178,11 +178,11 @@ describe("modals", () => {
|
||||
});
|
||||
|
||||
it("sprite object", () => {
|
||||
when.setTextInJsonEditor(JSON.stringify([{id: "1", url: "2"}]));
|
||||
when.setTextInJsonEditor(JSON.stringify([{ id: "1", url: "2" }]));
|
||||
|
||||
when.click("modal:settings.name");
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
sprite: [{ id: "1", url: "2"}],
|
||||
sprite: [{ id: "1", url: "2" }],
|
||||
});
|
||||
});
|
||||
|
||||
@@ -342,8 +342,8 @@ describe("modals", () => {
|
||||
});
|
||||
|
||||
it("add variable", () => {
|
||||
when.click("global-state-add-variable");
|
||||
when.wait(100);
|
||||
when.click("global-state-add-variable");
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
state: { key1: { default: "value" } },
|
||||
});
|
||||
@@ -373,6 +373,7 @@ describe("modals", () => {
|
||||
|
||||
it("edit variable key", () => {
|
||||
when.click("global-state-add-variable");
|
||||
when.wait(100);
|
||||
when.setValue("global-state-variable-key:0", "mykey");
|
||||
when.typeKeys("{enter}");
|
||||
when.wait(100);
|
||||
@@ -383,6 +384,7 @@ describe("modals", () => {
|
||||
|
||||
it("edit variable value", () => {
|
||||
when.click("global-state-add-variable");
|
||||
when.wait(100);
|
||||
when.setValue("global-state-variable-value:0", "myvalue");
|
||||
when.typeKeys("{enter}");
|
||||
when.wait(100);
|
||||
|
||||
Reference in New Issue
Block a user