Uh oh!
There was an error while loading. Please reload this page.
Fix for makeClipping/undoClipping issue - #63
Conversation
I've made earlier pull request with failing unit test for issue #1063 with `Element#makeClipping()`/`Element#undoClipping()`. Here is a patch for this issue. It deals with exact value of `element.style`, not with computed `Element#getStyle()`.
There was a problem hiding this comment.
Shouldn't this be if (!Object.isString(madeClipping))? If it's a string, it means we've already made this element clip, and so we're doing extra work for no reason.
There was a problem hiding this comment.
Also, do you need to change these conditionals at all? I might be missing something, but won't it suffice to do var overflow = element.style.overflow || '' like you did in the line below?
There was a problem hiding this comment.
Yes, you are absolutely correct, I've somehow missed negation in if (!Object.isString(madeClipping)).
And yes again, unchanged if (Object.isUndefined(madeClipping)) should work. I've made here isString() just for symmetry with check at line 1427: if (Object.isString(overflow)).
I've made earlier pull request with failing unit test for issue #1063 with
Element#makeClipping()/Element#undoClipping(). Here is a patch for this issue. It deals with exact value ofelement.style, not with computedElement#getStyle().