From 24fdad5f41616ae64d8f8a3e2efa648da866b6a6 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 16 Aug 2018 13:59:46 +0300 Subject: [PATCH 1/3] no need to open issues that notify about transifex --- .github/CONTRIBUTING.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 31e504d0..666643b7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,7 +21,7 @@ If not, then provide details describing which page the feature will effect, e.g. ## Adding translations -You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). When `messages.json` file is ready to be merged, please open a new bug report in [stylus/issues](https://github.com/openstyles/stylus/issues). +You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). ## Pull requests diff --git a/README.md b/README.md index 403074e0..cd56b1ae 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Stylus is a fork of Stylish for Chrome, also compatible with Firefox as a WebExt The source is hosted on [GitHub](https://github.com/openstyles/stylus) and pull requests are welcome. -You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). When `messages.json` file is ready to be merged, please open a new bug report in [stylus/issues](https://github.com/openstyles/stylus/issues). +You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). See our [contributing](./.github/CONTRIBUTING.md) page for more details. From adc165723c549c3466d86f4c25b492dbbf4aea74 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 16 Aug 2018 18:06:28 +0300 Subject: [PATCH 2/3] actually run restoreWindowScrollPos in a microtask --- edit/global-search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/global-search.js b/edit/global-search.js index d4fffafe..c8bdaa5c 100644 --- a/edit/global-search.js +++ b/edit/global-search.js @@ -882,7 +882,7 @@ onDOMready().then(() => { function restoreWindowScrollPos({immediately = true} = {}) { if (!immediately) { // run in the next microtask cycle - new Promise(() => restoreWindowScrollPos({immediately: true})); + Promise.resolve().then(restoreWindowScrollPos); return; } if (window.scrollX !== state.scrollX || window.scrollY !== state.scrollY) { From 4bcdbb78b131e6f7439392457fd63390d892e4ce Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 16 Aug 2018 19:58:05 +0300 Subject: [PATCH 3/3] ensure max>=min to keep colorpicker in view --- vendor-overwrites/colorpicker/colorpicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor-overwrites/colorpicker/colorpicker.js b/vendor-overwrites/colorpicker/colorpicker.js index cc37c5e0..2617b5e9 100644 --- a/vendor-overwrites/colorpicker/colorpicker.js +++ b/vendor-overwrites/colorpicker/colorpicker.js @@ -788,8 +788,8 @@ const maxTopUnobscured = options.top <= maxTop ? maxTop : options.top - height - 20; const maxRight = window.innerWidth - width; const maxRightUnobscured = options.left <= maxRight ? maxRight : options.left - width; - const left = constrain(0, maxRightUnobscured, options.left); - const top = constrain(0, maxTopUnobscured, options.top); + const left = constrain(0, Math.max(0, maxRightUnobscured), options.left); + const top = constrain(0, Math.max(0, maxTopUnobscured), options.top); $root.style.setProperty('left', left + 'px', 'important'); $root.style.setProperty('top', top + 'px', 'important'); }