witten
/
luminotes
Archived
1
0
Fork 0

Note resizing (growing and shrinking) now works as expected in Safari/Chrome. Shrinking didn't work before this fix.

This commit is contained in:
Dan Helfman 2008-10-07 16:39:49 -07:00
parent 8c7f05801c
commit 872d636ad4
2 changed files with 13 additions and 6 deletions

1
NEWS
View File

@ -3,6 +3,7 @@
* You can now create and end links. * You can now create and end links.
* Underline and strikethrough now work. * Underline and strikethrough now work.
* Pulldowns for search suggestions, importing, and exporting show up. * Pulldowns for search suggestions, importing, and exporting show up.
* Note resizing (growing and shrinking) works as expected.
* Improved page loading speed and fixed a rare session locking timeout bug * Improved page loading speed and fixed a rare session locking timeout bug
by removing all implicit session locking. by removing all implicit session locking.
* Fixed a bug that broke that Luminotes Desktop product download page if * Fixed a bug that broke that Luminotes Desktop product download page if

View File

@ -284,15 +284,21 @@ Editor.prototype.insert_html = function ( html ) {
Editor.prototype.resize = function () { Editor.prototype.resize = function () {
if ( !this.document ) return; if ( !this.document ) return;
var dimensions; var height;
// TODO: find a better way to determine which dimensions to use than just checking for contentDocument
if ( this.iframe.contentDocument ) { // Firefox if ( WEBKIT ) {
dimensions = { "h": elementDimensions( this.document.documentElement ).h }; var self = this;
withDocument( this.document, function () {
var body = getFirstElementByTagAndClassName( "body" );
height = elementDimensions( body ).h;
} );
} else if ( this.iframe.contentDocument ) { // Gecko and other sane browsers
height = elementDimensions( this.document.documentElement ).h;
} else { // IE } else { // IE
dimensions = { "h": this.document.body.scrollHeight }; height = this.document.body.scrollHeight;
} }
setElementDimensions( this.iframe, dimensions ); setElementDimensions( this.iframe, { "h": height } );
} }
Editor.prototype.key_pressed = function ( event ) { Editor.prototype.key_pressed = function ( event ) {