resizable: ignore height change on horizontal resize?

resizable: ignore height change on horizontal resize?

I use .resizable to build a two cols layout (sidebar and main-area). The sidebar is absolute, 0px space relative to both top and bottom, and need to be resized horizontal.
  1. <head>
  2.   <style type="text/css">
  3.     html, body { width: 100%; height: 100%; margin: 0; padding: 0; }
  4.     #sidebar { position: absolute; top: 0; bottom: 0; width: 200px; background: blue; }
  5.     #main { position: absolute; top: 0; bottom: 0; left: 200px; right: 0; background: silver; }
  6.   </style>
  7. </head>
  8. <body>
  9.   <div id="sidebar"  data-jq-resizable="{ handles: 'e', .... }">...</div>
  10.   <div id="main">...</div>
  11. </body>

The resizing part works well. I dragged the right border of the sidebar and it enlarged. But after that, I resized my browser to fullscreen, and find a white space appeared under the sidebar ---  .resizable() changed both the width and height during resizing and left these two numbers in style attribute, althought the height changing was in fact not needed.

I appended a stop handler as a temporary solution:
  1. .resizable({
  2.     handles: 'e',
  3.     stop: function () {
  4.         ui.element.css({ height: null });
  5.     }
  6. })

I'm considering whether this should be a default action. Depends on the handles type, 'e', 'w' handles ignore height changing, and 'n', 's' ignore the width changing, so whatever type layout the element is before resizing, it could remain after that.

A demo has been uploaded as attachment.



p.s:

There's another question in the demo; when I resize the sidebar, the main div should be resized at the same time. I use a resize handler to do this:
  1. $('#sidebar').resizable({
  2.     resize: function () {
  3.        $('#main').css({ left: ui.element.width() });
  4.     }
  5. })

How about if resizable supported a option to do this type linkage? eg:
  1. $('#sidebar').resizable({
  2.     linkage: { '#main' : 'left' }     // just a example, I don't insist on this data style
  3. })