Skip to content

Commit

Permalink
FIX: toolbar float bug #341
Browse files Browse the repository at this point in the history
  • Loading branch information
farthinker committed Nov 9, 2015
1 parent b1e07e3 commit 485c496
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
10 changes: 2 additions & 8 deletions lib/simditor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*!
* Simditor v2.3.4
* http://simditor.tower.im/
* 2015-10-28
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
Expand Down Expand Up @@ -1918,11 +1913,10 @@ Toolbar = (function(superClass) {
return true;
};
})(this);
floatInitialized = null;
$(window).on('resize.simditor-' + this.editor.id, function(e) {
var floatInitialized;
return floatInitialized = null;
return floatInitialized = initToolbarFloat();
});
floatInitialized = null;
$(window).on('scroll.simditor-' + this.editor.id, (function(_this) {
return function(e) {
var bottomEdge, scrollTop, topEdge;
Expand Down
5 changes: 2 additions & 3 deletions site/assets/scripts/simditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1913,11 +1913,10 @@ Toolbar = (function(superClass) {
return true;
};
})(this);
floatInitialized = null;
$(window).on('resize.simditor-' + this.editor.id, function(e) {
var floatInitialized;
return floatInitialized = null;
return floatInitialized = initToolbarFloat();
});
floatInitialized = null;
$(window).on('scroll.simditor-' + this.editor.id, (function(_this) {
return function(e) {
var bottomEdge, scrollTop, topEdge;
Expand Down
4 changes: 2 additions & 2 deletions src/toolbar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class Toolbar extends SimpleModule
@editor.placeholderEl.css 'top', toolbarHeight
true

floatInitialized = null
$(window).on 'resize.simditor-' + @editor.id, (e) ->
floatInitialized = null
floatInitialized = initToolbarFloat()

floatInitialized = null
$(window).on 'scroll.simditor-' + @editor.id, (e) =>
return unless @wrapper.is(':visible')
topEdge = @editor.wrapper.offset().top
Expand Down
2 changes: 1 addition & 1 deletion styles/simditor.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Simditor v2.3.4
* http://simditor.tower.im/
* 2015-10-28
* 2015-11-09
*/
@font-face {
font-family: 'Simditor';
Expand Down

0 comments on commit 485c496

Please sign in to comment.