mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #1985 from jasongrout/checkresize
Ignore resize events that bubbled up and didn't come from window.
This commit is contained in:
commit
fb8f730c6e
@ -52,9 +52,19 @@ define([
|
||||
this._resize_site();
|
||||
};
|
||||
|
||||
Page.prototype._resize_site = function() {
|
||||
// Update the site's size.
|
||||
$('div#site').height($(window).height() - $('#header').height());
|
||||
|
||||
|
||||
Page.prototype._resize_site = function(e) {
|
||||
/**
|
||||
* Update the site's size.
|
||||
*/
|
||||
|
||||
// In the case an event is passed in, only trigger if the event does
|
||||
// *not* have a target DOM node (i.e., it is not bubbling up). See
|
||||
// https://bugs.jquery.com/ticket/9841#comment:8
|
||||
if (!(e && e.target && e.target.tagName)) {
|
||||
$('div#site').height($(window).height() - $('#header').height());
|
||||
}
|
||||
};
|
||||
|
||||
return {'Page': Page};
|
||||
|
Loading…
Reference in New Issue
Block a user