Commit Graph

376 Commits

Author SHA1 Message Date
James 90dcc1ffb7 Remove caching from for loops
Removed caching from for loops as it does not seem to increase
performance and makes the code harder to read.
2015-03-31 10:22:52 +04:00
Mert Kahyaoğlu 63aa7259b9 move getReactRootElementInContainer to ReactMount.js
getReactRootElementInContainer.js file contains one function used only
in ReactMount.js.
2015-03-20 20:50:11 +02:00
Mert Kahyaoğlu 0c1eca7dfc fix doc comments and typos 2015-03-20 18:21:29 +02:00
Ben Alpert 7fe5a3aadd Merge pull request #3442 from spicyj/kill-initializeTouchEvents
Kill React.initializeTouchEvents for good
2015-03-19 14:15:26 -07:00
Ben Alpert a321247ee5 More lint fixes 2015-03-17 14:17:03 -07:00
Ben Alpert 26664315a6 Merge pull request #3438 from spicyj/lint
Lint fixes
2015-03-17 14:14:57 -07:00
Ben Alpert 9c4c2f58ea Kill React.initializeTouchEvents for good
Now that #1169 is fixed, the only thing this is used for is to determine whether `onTouchTap` causes touch listeners to be added. The only internal uses of TapEventPlugin are where touch events are already initialized (so this doesn't make a difference) and we don't support `onTouchTap` as part of the public API so this should be safe.
2015-03-17 14:12:26 -07:00
cpojer fb23276178 Add warning for getDOMNode calls. 2015-03-17 14:08:04 -07:00
Ben Alpert c34fa7f3d2 Lint fixes 2015-03-17 13:30:15 -07:00
Jim 12059299f3 Added webcomponents.js and a simple unit test verifying a document fragment as a valid React container. 2015-03-16 16:37:05 -07:00
Jim 73f4dc59d8 Merge pull request #3169 from jsfb/mount-into-shadowdom
Allow rendering into document fragments. Fixes #840
2015-03-16 16:15:03 -07:00
Paul O’Shannessy 99cbaed836 Ensure FullPageComponents are treated as DOM components
We currently override a couple DOM components. We need to ensure everything we
override is still treated as a DOM component, even if it has a composite
component wrapper.
2015-03-16 15:18:39 -07:00
Austin Wright 29416f422e Appease eslint 2015-03-14 14:08:18 -07:00
Austin Wright b52bb22342 Move list of newline-eating tags to variable 2015-03-14 13:57:15 -07:00
Austin Wright 030a7b34c7 Add back \n-to-be-eaten for the plain-text elements
The comment hack to enable polyglot HTML isn't cross-browser, or simply doesn't work.
2015-03-14 13:53:12 -07:00
Austin Wright 8e714f9898 Update tests to use Polyglot profile of HTML 2015-03-14 13:53:12 -07:00
Austin Wright e913e85e1a Use a Polyglot HTML-safe method of escaping leading newline in rawtext elements 2015-03-14 13:53:12 -07:00
Austin Wright 8bc828aa7c Generate XML-compatible tags and boolean attributes 2015-03-14 13:53:12 -07:00
Paul O’Shannessy 68a2f89cc6 Merge pull request #3402 from vkramskikh/fix-empty-selects-with-value
Fix for empty <select> elements with value
2015-03-13 18:04:57 -07:00
Robert Knight ee86942d77 Fix incorrect update of style when props.style transitions from null to non-null
ReactDOMComponent maintains a copy of the previous style
object to support in-place mutations of props.style.

This cached object was not cleared when the style
property was removed in a props update.

Fixes #3409
2015-03-13 22:16:19 +00:00
Vitaly Kramskikh 2f52d81865 Fix for empty <select> elements with value
There is an exception when value or defaultValue is set but there are no
children as ReactDOMSelect tries to mark the first children as selected
even if there are no children.
2015-03-13 21:48:02 +07:00
cpojer 413e96d0cd Add some important getDOMNode tests back. 2015-03-10 17:27:19 -07:00
cpojer ae7da3aadd foo.getDOMNode => React.findDOMNode(foo) 2015-03-10 17:17:21 -07:00
Ben Alpert 53f92bf858 Fix comma splice and line length 2015-03-10 15:36:27 -07:00
Jim 645a6caaf5 Merge pull request #3323 from jonhester/ie8-compat-mode
warn if IE8 is in compatibility mode
2015-03-10 15:35:09 -07:00
Ben Alpert e8af59cf82 Merge pull request #3246 from spicyj/onclick
Revert "Revert #1536"
2015-03-10 15:31:38 -07:00
Ben Alpert 68ca057bc3 Merge pull request #3230 from nmn/master
Add numeric CSS property - stroke width
2015-03-10 15:31:30 -07:00
Ben Anderson 75a8bc96b1 Warn when rendering directly into document.body
This is in response to #3207 to address concerns regarding third-party
scripts and browser plugins potentially altering DOM nodes within
document.body, causing problems with reconciliation.

Closes #3211.
2015-03-10 15:31:02 -07:00
Ben Alpert f77de57e41 Merge pull request #2946 from benmoss/nested-render-warning
Add displayName to nested render warnings [#1726]
2015-03-10 15:24:59 -07:00
Ben Alpert 4feed4fcc5 Merge pull request #2868 from chicoxyzzy/dev_and_prod_environments_consistancy
make dev and production environment consistent
2015-03-10 15:24:33 -07:00
Ben Alpert 9cb25b3ddb Merge pull request #2266 from syranide/voidelem
ReactDOMComponent should not accept children for void elements
2015-03-10 15:24:00 -07:00
Paul O’Shannessy e313616be7 Bump version so we can get back to work 2015-03-10 15:06:35 -07:00
Jon Hester 65c4aeaa3a use warning module instead of console.debug 2015-03-05 18:53:12 +00:00
Jon Hester a999ac1ac3 warn if IE8 is in compatibility mode 2015-03-05 13:48:28 +00:00
Paul O’Shannessy 21b41480a5 v0.13.0-rc2 2015-03-03 11:46:01 -08:00
Sebastian Markbage 4adcee69a0 Add cloneElement Implementation
This is a new version of cloneWithProps but this one is moving out of
add-ons. Unlike cloneWithProps, this one doesn't have special logic for
style, className and children.

This one also preserves the original ref. This is critical when upgrading
from a mutative pattern where a child might have a ref on it.

It also preserves context, which is similar to how context would work when
it is parent based. It also ensures that we're compatible with the old
mutative pattern which makes updates easier.
2015-02-26 01:17:05 -08:00
Andreas Svensson 20dd247292 ReactDOMComponent should warn when provided children for void elements 2015-02-26 10:14:47 +01:00
Ben Alpert 1943a9a0db Only call put/deleteListener with truthy listeners
Without this, transitioning from `<div onClick={null} />` to `<div />` triggered `willDeleteListener` to delete the `click` handler which caused problems; now, we only call `putListener` and `deleteListener` when we have an actual listener.

I now also clean up the `onClickListeners` map upon deletion and don't double-listen when updating the event listener.
2015-02-23 14:52:30 -08:00
Ben Alpert 090e4bbc9a Revert "Revert #1536"
Formerly "Attach empty onclick listener to each node". This reverts commit 431155d2e2.
2015-02-23 14:28:22 -08:00
Paul O’Shannessy 06126ad3f4 v0.13.0-rc1 2015-02-22 13:26:13 -08:00
Naman Goel 34d5e05199 Merge branch 'master' of https://github.com/facebook/react
* 'master' of https://github.com/facebook/react: (30 commits)
  Expose --target flag on jsx executable
  Contributing: cleanup quote style
  Add Relay blog post
  Fix long lines in vendor/fbtransform/visitors
  lint vendor/*.js
  fix .eslintignore
  remove ballmer example
  Fix a doc. cloneWithProps clones a ReactElement.
  lint from root
  Fixed mistake in jsdocs types for cloneWithProps
  Put deprecation warning for classSet
  Lint vendor/fbtransform as well
  More warnings to ReactFragment.create
  Warn when using constructor function directly
  Move option parsing into react-tools proper.
  Remove lodash devDependency
  Added the immutability talk to the React.js Conf update.
  Use same pathways for browser transforms as we use in react-tools
  lint: remove spaces from array brackets
  lint: remove spaces from object braces
  ...
2015-02-22 15:57:34 +01:00
Naman Goel 20d3f0db29 CSS property 2015-02-22 15:57:30 +01:00
chico 9185323959 make dev and production environment consistent 2015-02-22 14:58:42 +03:00
Henry Zhu 07cfd66028 lint: remove spaces from object braces 2015-02-19 00:10:31 -05:00
Paul O’Shannessy 6c29eba035 Merge pull request #2821 from zpao/unitless-css-boxflex
Add boxFlex and boxFlexGroup to CSS Unitless Properties
2015-02-18 17:22:56 -08:00
Jim 93f6fc9eeb Allow rendering into document fragments. Fixes #840 2015-02-17 11:24:03 -08:00
Paul O’Shannessy 68a8e4491f Merge pull request #3147 from hzoo/lint-fixes
lint whitespace , trailing comma
2015-02-17 10:58:42 -08:00
Vincent Siao 96e4e3cbbc Fix ReactMount._renderNewRootComponent signature (ReactComponent -> ReactElement) 2015-02-15 19:25:18 -08:00
Henry Zhu e2a57920da lint whitespace , trailing comma 2015-02-13 23:13:47 -05:00
Paul O’Shannessy 5126cee0f5 v0.13.0-beta.2 2015-02-13 18:28:03 -08:00