make the scrollbar fit the element which has the max-height ormax-width attribute or both of them.
fix bug