CARVIEW |
jquery / jquery-ui
- Source
- Commits
- Network (263)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
Comments for jquery-ui


This modification triggered a bug for a few clients on chrome, their window had a height of ~50px, i had to revert this change to get the normal behaviour (or I could add width: 'auto' in modal options for all my modals but hey, too boring ^)
but I don't know why they had this bug, I couldn't reproduce it on chrome myself

That's great Scott, thanks

You can actually do this simpler than the method call...
div.style.cssText = 'min-height:100px;height:auto;padding:0;border-width:0';


We could set height, padding, and border as well to ensure it's "safe" from other declared styles.

Though even
.offsetHeight >= 100;
might give a false positive a style sheet sets DIVs height to above 100px.

cool. It can be reduced...
var div = document.createElement( "div" ), body = document.body; div.style.minHeight = "100px"; $.support.minHeight = body.appendChild(div).offsetHeight >= 100; body.removeChild(div); // div = null; < - not really needed either just there for dev superstition

I honestly don't know. This code is adapted from jQuery core: https://github.com/jquery/jquery/blob/master/src/support.js#L104-112
I had the same question, but nobody was around for me to ping when I was implementing this :-P

Why hide div when it is already removed and about to be nulled ?

We don't, the test makes sure that destroy isn't called on .detach().

Why destroy widgets on detach?

Wait, thats all?

Beautiful!

I did this for consistency with core. We could make this change and see about getting it into core as well.

uhm you forgot to replace localhost with the correct swarm url swarm.jquery.org now all tests fail due to timeout.
I temporarily redirected lcoalhost to swarm.jquery.org to be able to run the testswarm tests

Fixed it here: https://github.com/jquery/jquery-ui/commit/d8bee228b37e1dd3b6e81a145729b762cdf90b09

I think it would be even more useful to do throw new Error("[message]") - that way the exception will contain fileName and lineNumber properties, making debugging even easier.
A quick Firebug test seems to confirm that, but I'm actually not sure about the exact semantics of throw and Error...

You're right, thanks for sharing. One way to fix this would be to split the TestSwarm inject code into its own file, load that at the end and put the testsuite.js back in order where it belongs.

Doesn't this change cause an error when the test is run? Because the order in which the js-files are loaded matters.
When testsuite.js is loaded after the xxx_defaults.js file (e.g. sortable_defaults.js) the call to commonWidgetTests(...) fails as it is still undefined. Because it is defined in testsuite.js which previously was loaded before sortable_defaults.js.
This holds true for all unit-tests touched in this commit. droppable, sortable, selectable, resizable
I noticed this when running the tests via swarm.jquery.org where many jobs for jquery-ui tests show a black Err label instead of a green 1 test passed (disabled dummy test) sign
- © 2010 GitHub Inc. All rights reserved.
- Terms of Service
- Privacy
- Security
Keyboard Shortcuts
Site wide shortcuts
- s
- Focus site search
- ?
- Bring up this help dialog
Commit list
- j
- Move selected down
- k
- Move selected up
- t
- Open tree
- p
- Open parent
- c or o or enter
- Open commit
Pull request list
- j
- Move selected down
- k
- Move selected up
- o or enter
- Open issue
Issues
- j
- Move selected down
- k
- Move selected up
- x
- Toggle select target
- o or enter
- Open issue
- I
- Mark selected as read
- U
- Mark selected as unread
- e
- Close selected
- y
- Remove selected from view
- c
- Create issue
- l
- Create label
- i
- Back to inbox
- u
- Back to issues
- /
- Focus issues search
Network Graph
- ← or h
- Scroll left
- → or l
- Scroll right
- ↑ or k
- Scroll up
- ↓ or j
- Scroll down
- t
- Toggle visibility of head labels
- shift ← or shift h
- Scroll all the way left
- shift → or shift l
- Scroll all the way right
- shift ↑ or shift k
- Scroll all the way up
- shift ↓ or shift j
- Scroll all the way down