Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Travis comments
  • Loading branch information
share-with-me committed Jun 17, 2017
commit 7774619f7d81a77573d7f462d6f7dab973b0f149
2 changes: 1 addition & 1 deletion assets/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ $(document).ready(function () {
return false;
});

$('#originalText').mouseup( function() {
$('#originalText').mouseup(function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the mouseup event? Is there not a resize event?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not a resize event?

This stackoverflow link discusses about a resize event that we will need to code up to detect a change in textarea dimensions. This too, uses mouseup event only! Thus, I chose to go with the mouseup approach!

if($('#originalText').height() < originalTextScrollHeight) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to check something like :overflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, :overflow to check if the element is having the overflow?

$('#originalText').css('overflow-y', 'scroll');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't this situation be solved with simply a overflow: y-scroll? I'm guessing you've tried it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't this situation be solved with simply a overflow: y-scroll?

Um, I had tried that! As soon as synchronizeTextareaHeights method is called, the CSS for this div changes. And thus, I started with this approach of checking if the textarea height falls in the range for scrolling!

}
Expand Down