Skip to content

Commit

Permalink
Fixed #9. Again.
Browse files Browse the repository at this point in the history
  • Loading branch information
andris-sevcenko committed Jul 25, 2018
1 parent 7a3bdea commit d46bd96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## Unreleased

### Fixed
- Fixed a bug where the fixed toolbar was not working. ([#9]((https://github.com/craftcms/redactor/issues/9))
- Fixed a bug where it was impossible to define translation overrides. ([#63](https://github.com/craftcms/redactor/issues/63))

## 2.1.2 - 2018-07-14
Expand Down
10 changes: 5 additions & 5 deletions src/assets/field/dist/js/RedactorOverrides.js
Expand Up @@ -43,32 +43,32 @@ imageResizeClass.prototype._build = function (e) {
this.$resizer.on('mousedown touchstart', this._set.bind(this));

if (this.toolbar.isTarget()) {
this.$target.on('scroll', this.rebuild.bind(this));
this.$target.on('scroll.resizer', this.rebuild.bind(this));
} else {
$('#content-container').on('scroll', this.rebuild.bind(this));
$R.dom('#content-container').on('scroll.resizer', this.rebuild.bind(this));
}
}
};
// Stop listening to scroll
imageResizeClass.prototype.hide = function () {
this.$target.find('#redactor-image-resizer').remove();
if (this.toolbar.isTarget()) {
this.$target.off('scroll', this.rebuild.bind(this));
this.$target.off('scroll.resizer', this.rebuild.bind(this));
} else {
$('#content-container').off('scroll', this.rebuild.bind(this));
$R.dom('#content-container').off('scroll.resizer', this.rebuild.bind(this));
}
};

// Adjust the positioning of fixed toolbar
// =============================================================================

var toolbarFixedClass = $R['classes']['toolbar.fixed'];

toolbarFixedClass.prototype._doFixed = function() {
var $editor = this.editor.getElement();
var $container = this.container.getElement();
var $toolbar = this.toolbar.getElement();
var $wrapper = this.toolbar.getWrapper();

var $targets = $container.parents().filter(function(node)
{
return (getComputedStyle(node, null).display === 'none') ? node : false;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/field/dist/js/RedactorOverrides.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d46bd96

Please sign in to comment.