repository stringclasses 156 values | issue title stringlengths 1 1.01k ⌀ | labels stringclasses 8 values | body stringlengths 1 270k ⌀ |
|---|---|---|---|
facebookreact | unexpected ssr difference warn with svg primitive | Bug | do you want to request a feature or report a bug bug what be the current behavior I ve start recieve this warning about my svg which be use fegaussianblur warning expect server html to contain a matching in what be the expect behavior should be no warning because there be no difference which version of react and which browser os be affect by this issue do this work in previous version of react such behavior start right after update to react 16 0 0 rc 3 and never happen with react 15 6 1 |
facebookreact | pattern for parent initiate fetch of child datum | Question | for performance reason I have a child element whose data be store in its state and only its state instead of be pass up the hierarchal chain use callback pass in prop there then come a time where an action in the parent element dictate that I now need that datum what be the correct pattern for fetch it in the child do I use ref and call a child fetchdata method via a save reference do I change a prop flag cause the child to call a prop callback with the datum |
facebookreact | test totree on a render array | Bug | I don t know if this be a bug or if I be do it wrong when I have a component that the render return an array in fiber the render return only the first element javascript const wrap child child describe test it render 2 div const render reacttestrenderer create one two console log render totree render what be the current behavior log s only the first element what be the expect behavior I think this should be an array of element which version of react and which browser os be affect by this issue do this work in previous version of react react 16 |
facebookreact | return plain string from component render collapse text node on server | Bug | observe this on js import react from react import rendertostre from react dom server const b b console log rendertostre a c this render as abc if you try to hydrate this you ll get the error text content do not match server bc client b |
facebookreact | bug argument 1 of eventtarget dispatchevent do not implement interface event | Invalid | I have apply a event onmousedown for a element but on firefox 54 0 1 64 bit osx I catch this error title I do a debug and see that it occur at reacterrorutil invokeguardedcallback function when execute the code fakenode dispatchevent evt react 15 6 1 reactdom 15 6 1 os detail os x yousemite version 10 10 5 14f2009 processor 2 8 ghz intel core i7 memory 16 gb 1600 mhz ddr3 graphic intel iris pro 1536 mb |
facebookreact | ctrl enter keypress only work in firefox | Bug | it doesn t work in chrome ie 11 edge nor chrome on ubuntu these browser report a charcode of 10 and the event dispatcher dismiss it I ve make a pull request with an unobtrusive fix here 10514 |
facebookreact | reference key within react child map be define | Question | this isn t necessarily a bug or a feature more so ask for why it be implement as it currently be when inside of a component this key be undefined however child key be define and have a value within react child map I realize these point to different instance just demonstrate the difference example javascript class example extend react component render console log this key undefined return react child map this prop child child console log child key define return child I expect child key to not be readable writeable within react child map however it be both which seem counterintuitive to the idea that this key be undefined within the component |
facebookreact | server side rendering warning be use uppercase html always use lowercase html tag in react | Bug | do you want to request a feature or report a bug report a bug what be the current behavior whenever I render svg element that be camel case e g on the server side I get the follow warning warning be use uppercase html always use lowercase html tag in react what be the expect behavior warning should be consistent with the client side render if possible in this case I d expect no warning since use camel case svg element name be pretty standard for client side rendering there seem to be a check for the current namespace l344 l352 for server side rendering there seem to be currently no such check in place l537 l544 which version of react and which browser os be affect by this issue do this work in previous version of react hit this on 16 0 0 beta 5 be not hit it on 15 6 1 the version I be previously on thank in advance |
facebookreact | add test for transition | Enhancement | I delete it in because it wasn t test the public api and it be hard to say if it test the path the code actually take we should either add a similar test against public api or an equivalent test to manual fixture see issuecomment 320471544 for detail |
facebookreact | onmouseleave strange behaver when have disable child element | Duplicate | bug report here be the demo when contain an disabled button react can trigger onmouseenter correctly in div but onmouseleave not trigger when mouse on the button and move down out of the div I try 15 4 0 15 6 1 in chrome have the issue not sure whether it appear before that |
facebookreact | unhandled error be display twice | null | this be a bit weird look at the last log notice how our internal error that we re suppose to just give to the error boundary be say to be uncaught I wonder why it doesn t look like intentional |
facebookreact | dispatch blur event on sibling | Question | there be two element on the same level and they be both have onblur handler when one element lose focus in his callback I try to dispatch blur event for the second element and I have maximum call stack size exceed error in console try example in jsfiddle click on second element and press tab button to lose focus example link version 15 5 4 |
facebookreact | add an image tag inside a react component throw error | Bug | while work on an app I be try to use an image tag I think it be something with my setup but I strip everything down to zero as below index html index js import react from react import reactdom from react dom reactdom render document getelementbyid app the image render properly but I get an error in console that read index bundle js 659 uncaught typeerror can not read property reactinternalinstance oz59ctes8c of null at object getclosestinstancefromnode index bundle js 659 at findparent index bundle js 19989 at handletoplevelimpl index bundle js 20018 at reactdefaultbatchingstrategytransaction perform index bundle js 4017 at object batchedupdate index bundle js 19940 at object batchedupdate index bundle js 1382 at dispatchevent index bundle js 20098 dig into the source the error be throw from the follow function inside src renderer dom share reactdomcomponenttree js give a dom node return the close reactdomcomponent or reactdomtextcomponent instance ancestor function getclosestinstancefromnode node if node internalinstancekey return node internalinstancekey walk up the tree until we find an ancestor whose instance we have cache var parent while node internalinstancekey parent push node if node parentnode node node parentnode else top of the tree this node must not be part of a react tree or be unmounted potentially return null var close var inst for node inst node internalinstancekey node parent pop close inst if parent length precachechildnode inst node return close it doesn t matter where I put the image inside a component surround by divs with sibling alone nothing get rid of this error |
facebookreact | throw when host component have a function child | Bug | it surprise I that this doesn t throw neither in stack nor in fiber js reactdom render function document getelementbyid container isn t this always indicative of a mistake |
facebookreact | react 16 unstable rendersubtreeintocontainer do not always return an instance | Duplicate | do you want to request a feature or report a bug a bug what be the current behavior I be use the react modal library and test it under react 16 beta it throw an error when I try to close the modal the reason be it call rendersubtreeintocontainer here l156 and expect an instance back but sometimes it s null so when it s close and it s try to read it s state here l132 you get a null reference error if you use the api like be work but only because the component never try to read from this portal if you use it like this state open you get the error because it try to read it in componentwillunmount l132 if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template what be the expect behavior rendersubtreeintocontainer should always return an instance so this modal librarly work it will close which version of react and which browser os be affect by this issue do this work in previous version of react react 16 beta it work in all previous version |
facebookreact | reactdom render unstable renderintocontainer doesn t return instance if call during an update | Bug | do you want to request a feature or report a bug bug what be the current behavior reactdom render and reactdom unstable rendersubtreeintocontainer no long return create react component instance if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template this eparentelement document createelement div const reactcomponent react createelement this reactcomponent param this componentref reactdom render reactcomponent this eparentelement what be the expect behavior after the step above this componentref should be an instance just create it be now null with react 16 beta it s entirely possible that I should be do something different now but if so it s not clear what that should be which version of react and which browser os be affect by this issue do this work in previous version of react react 16 beta chrome osx thank |
facebookreact | react 16 server renderer break with style object in prod mode | Bug | there be a bug in the react 16 beta server renderer report by 7rulnik in the react 16 beta thread issuecomment 318231160 where the renderer throw an exception when style be include and node env be production give this file index js const react require react const reactserver require react dom server const foo1 react createelement div classname sign link i d sign layout link style position absolute console log reactserver rendertostre foo1 if you run node env production node index js you ll get typeerror re be not a function at user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 7774 at user v7rulnik project kupibilet internals kupibilet ru node modules fbjs lib memoizestringonly js 23 32 at f user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 2423 at b user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 3163 at e renderdom user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 9665 at e render user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 8762 at e read user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 8452 at object t as rendertostre user v7rulnik project kupibilet internals kupibilet ru node module react dom cjs react dom server production min js 1 4384 at repl 1 13 at contextifyscript script runinthiscontext vm js 44 33 weirdly dev mode do not throw an error |
facebookreact | incorrect datum in compositionend event when type korean on ie11 | Bug | to reproduce in ie11 on win7 or win10 go to open the developer console switch to the microsoft korean ime standard setting and switch to korean input put the cursor in the contenteditable div and type on a qwerty keyboard this be type as dufma do the same for the input field result in the developer console a list of composition event and the content of the data attribute be log however the datum of the first compositionend event be wrong it should be not see screenshot below selection 329 you can see that this be wrong by try out the same thing on as see in the screenshot below a plain non react input field emit a compositionend event with the proper datum korean 11 413 15063 0 this occur with the late version of react but I have also see this behaviour in old version an example of where this cause problem be in draft js |
facebookreact | uncontrolled radio fix be break master | Bug | I m not sure why but seem to have cause issue in production with we we ll need to either revert or find a way to fix forward right now master be break and if we sync again before fix we ll break thing |
facebookreact | make use of reactdebugcurrentframe getcurrentstack reentrant | Enhancement | I realize that the refactor to use reactdebugcurrentframe as a decouple stack frame for error message be not reentrant r127573520 fiber be not reentrant but other renderer might be the synchronous server renderer be atm we should add test for warning between renderer such as call a server render from within a client render and update the set reset callsite to use push pop instead to account for that |
facebookreact | dev only require in fb bundle | Bug | I see reactdomfiber prod start with js var invariant require fbjs lib invariant eventlistener require fbjs lib eventlistener react require react warning require fbjs lib warn executionenvironment require fbjs lib executionenvironment require fbjs lib camelizestylename var hyphenatestylename require fbjs lib hyphenatestylename memoizestringonly require fbjs lib memoizestringonly require prop type var emptyfunction require fbjs lib emptyfunction containsnode require fbjs lib containsnode focusnode require fbjs lib focusnode getactiveelement require fbjs lib getactiveelement shallowequal require fbjs lib shallowequal require prop type checkproptype notice how require prop type shouldn t be there we probably require it and then don t use it in prod we need some mechanism to express a module be pure from side effect and have rollup dce this require |
facebookreact | fiber infinite recursion in mount lifecycle | Bug | here be an app there be intentionally a bug in this app the app component return this setstate variable and demo call setvariable in componentdidmount and componentwillreceiveprop it shouldn t this be bad user code what this issue raise be a regression behaviour in react 16 compare to 15 in react 15 it render but you directly get a uncaught rangeerror maximum call stack size exceed in react 16 nothing render the app never load and the browser be spin forever I think react be stick in an infinite recursion I presume this be because fiber be by nature async the fact thing never end make it very hard to investigate and isolate the source of the problem in a large codebase should there be some sort of maximum call stack in fiber context when we migrate our app to late react native recently we have a weird freezing case the app be completely unresponsive no button work but you could still do native action like scroll a scrollview however even the rn devtool menu action be not work like the inspector probably because it involve js and react be just stick in this recursion loop in our case the issue be because call relay setvariable in lifecycle but with a wrong logic for some reason our code use to work in the past but now create this recursion loop |
facebookreact | curry onblur handler not trigger anymore when use v15 6 1 in production mode | Bug | do you want to request a feature or report a bug bug what be the current behavior when switch from v15 6 1 s development into production mode the in the example below define curry onblur handler suddenly stop work it seem to have something to do with the number of argument if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template react v15 6 1 production partially work react v15 6 1 development fully work react v15 1 0 production fully work also work fine in development mode react v16 0 0 alpha 13 development partially work what be the expect behavior whatever the correct usage of the handler function might be in the end at least the behavior should stay the same across the different build mode which version of react and which browser os be affect by this issue do this work in previous version of react this be work fine with v15 1 0 development and production |
facebookreact | multiple click need for non anchor element onclick with padding in safari | Bug | do you want to request a feature or report a bug bug what be the current behavior in mobile safari and some version of desktop safari onclick on any non anchor element require two click to trigger if the element contain multiple comment text node and the click be on the second or late text node and either the element have padding and the element be not set to or natively display inline or the element have display flex thank malash it can be work around by either not have pad on the element or ensure that the element contain only one text node or add a single top level element inside the element with the onclick and then have multiple text node within that instead e g multi node instead of multi node if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template this can be see on this fiddle first yea be a span with one text node one click work second yea be the first text node of a span with padding one click work nah be the second text node of a span with padding need two click third and fourth yeah have the same markup span with multiple text node but no padding one click work note that you ll need to zoom in to make sure you re hit the nah on mobile to reproduce the behaviour as it s sensitive to the exact area hit note that on desktop to ensure that you re click on the text you should be see the text cursor when over the nah item if you re see the default cursor then you re on the which will work what be the expect behavior all text node should trigger the click handler on the first click which version of react and which browser os be affect by this issue do this work in previous version of react current react desktop safari 10 1 1 12603 2 4 mobile safari on ios 10 3 2 14f89 use agent 5 0 iphone cpu iphone os 10 3 2 like max os x applewebkit 603 2 4 khtml like gecko version 10 0 mobile 14f89 safari 602 1 thank to scottlyttle and stella h for this |
facebookreact | improve error when you ve forget to extend react component | Enhancement | when you forget to extend react component you get the follow error typeerror can not call a class as a function at classcallcheck null js 7 99 at hello null js 11 5 react internal example it would be nice if in dev you could do a check for component prototype render and if it exist provide a well warning along the line of warn use a class with a render method as a function do you forget to extend react component I believe it would happen in reactcompositecomponent js l248 |
facebookreact | setstate callback call with null instead of undefined | Bug | do you want to request a feature or report a bug bug what be the current behavior in react v16 the callback function that be an optional parameter to the setstate function be call and pass a value of null previously in react v15 the function be call with a value of undefined this change break the default parameter feature of javascript I discover this behavior while work on a react native project hence the example use view text if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template import react component from react export default class mycomp extend component componentdidmount this setstate val console log val render return this prop climb what be the expect behavior the callback function will be call with undefined which version of react and which browser os be affect by this issue do this work in previous version of react break behavior be observe in react 16 alpha 12 and react native 0 45 1 I replicate the issue in react 15 4 1 and react native 0 40 0 and it be work as expect |
facebookreact | react test renderer shallow setstate callback be never call | Bug | do you want to request a feature or report a bug bug follow on from what be the current behavior in node modules react test renderer cjs react test renderer shallow development js the callback second argument to setstate be never call if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template js import shallowrenderer from react test renderer shallow const renderer new shallowrenderer renderer render const instance renderer getmountedinstance instance methodthatcallssetstate callback pass into setstate as the second argument within methodthatcallssetstate be never call the shallow renderer code be as follow js updater prototype enqueuesetstate function enqueuesetstate publicinstance partialstate callback callername if typeof partialstate function partialstate partialstate publicinstance state publicinstance prop this renderer newstate extend publicinstance state partialstate this renderer render this renderer element this renderer context as you can see the callback be ignore in the deep renderer node module react test renderer cjs react test renderer development js the callback be use js enqueuesetstate function instance partialstate callback var fiber reactinstancemap 1 get instance var prioritylevel getprioritycontext fiber false callback callback undefine null callback warnoninvalidcallback callback setstate addupdate 1 fiber partialstate callback prioritylevel scheduleupdate fiber prioritylevel what be the expect behavior the callback be call which version of react and which browser os be affect by this issue do this work in previous version of react react v16 react test renderer v16 I don t know if this work before |
facebookreact | input with type radio incorrectly trigger onchange handler | Bug | bug if I put several input type radio with same name as in jsfiddle example below onchange handler trigger only once for individual input when mouse click on input happen jsx example try to click on different radio input several time next click have no console log output I expect trigger onchange every time when I click on non select radio input bug reproduce in several late version of react at least 15 6 0 and 15 6 1 my os be ubuntu I try in late chrome and late firefox |
facebookreact | dangerouslysetinnerhtml in ie11 for svg element | Bug | do you want to request a feature or report a bug bug what be the current behavior when use dangerouslysetinnerhtml of svg element the dom node from the previous render aren t be remove if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template see this fiddle what be the expect behavior the dom should only contain the last render value for dangerouslysetinnerhtml which version of react and which browser os be affect by this issue do this work in previous version of react react 15 5 4 browser ie11 do this work in previous version of react not sure after dig around I find 6982 which make I think this be happen because of this line l37 in setinnerhtml js where it look like this js ie do not have innerhtml for svg node so instead we inject the new markup in a temp node and then move the child node across into the target node if node namespaceuri domnamespace svg innerhtml in node reusablesvgcontain reusablesvgcontain document createelement div reusablesvgcontain innerhtml html var svgnode reusablesvgcontain firstchild while svgnode firstchild node appendchild svgnode firstchild because there s a call to node appendchild svgnode firstchild it will never remove all of the previous node but only add the new one but that s just a guess |
facebookreact | do not add unit to css custom property | Bug | do you want to request a feature or report a bug bug what be the current behavior js become html if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template what be the expect behavior leave value same as they be pass which version of react and which browser os be affect by this issue do this work in previous version of react react 15 6 0 |
facebookreact | onclick and onchange doesn t fire on radio button on io | Bug | do you want to request a feature or report a bug bug what be the current behavior onclick and onchange doesn t fire on radio button on ios typeerror undefined be not an object evaluate descriptor get call if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template what be the expect behavior onclick and onchange should fire which version of react and which browser os be affect by this issue do this work in previous version of react react 15 6 0 on io be work on 15 5 4 |
facebookreact | react addon update 15 5 2 use object assign | Bug | do you want to request a feature or report a bug undocumented breaking change for ie11 what be the current behavior start react addon update v15 5 the package have be change from depend on an internal file from the react package react lib update js to actually include the full implementation while the internal implementation depend on the object assign polyfill the external one actually call object assign directly break support with ie 11 lib update js this require user that support ie11 to polyfill object assign this be not mention in the release blog post of react 15 5 react addon if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template what be the expect behavior add a mention of this to the release blog post which version of react and which browser os be affect by this issue do this work in previous version of react react 15 5 work fine in react 15 4 |
facebookreact | mouseleave event fire unexpectedly when mouse into descendant node with a different react root | Bug | do you want to request a feature or report a bug bug what be the current behavior when mouse into a descendant dom node that have a different react root the mouseleave event on the parent react dom component be fire unexpectedly if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template demo 1 open the console to see the log print 2 mouse from the parent into the normal child and then back out and note that mouseleave do not fire 2 mouse from the parent into the portal child render by embed a new react root and note that mouseleave do fire mouse back out and note that it fire again sometimes it fire multiple time for the enter exit step what be the expect behavior mouseleave should not fire when enter exit the portal child since it be a descendant node of parent which version of react and which browser os be affect by this issue do this work in previous version of react test with the following and the issue be reproducible in all case react 15 4 1 and 15 5 3 late chrome firefox safari |
facebookreact | synthetic eventphase doesn t reflect the synthetic phase | Bug | do you want to request a feature or report a bug bug what be the current behavior both onclick and onclickcapture call on bubble phase if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template demo show that event phase in onclickcapture for react be incorrect it s bubble but must be capture moreover event nativeevent also show bubble phase so probably the reason be not in syntethic event what be the expect behavior onclickcapture call during capturing phase onclick call during bubble phase which version of react and which browser os be affect by this issue do this work in previous version of react react version 15 5 4 os win7 do this work don t know |
facebookreact | can not t mount text node component | Bug | can not t mount text node component in a child window in ie11 and edge jsx const somecomponent this will be display this will not be display this be the text node that will break the mount this will not be display because the mounting have stop class popoutwindow extend react component constructor prop super prop this state openedwindow null componentdidmount var win container openedwindow var onloadhandler container win document createelement div container i d test win document body appendchild container reactdom render this prop child container openedwindow update newcomponent reactdom render newcomponent container this setstate openedwindow openedwindow win window open about blank test width 600px height 600px win onload onloadhandler call onload handler in case it s not be call settimeout onloadhandler 0 componentdidupdate this state openedwindow update this prop child render return reactdom render container it throw the follow error script87 invalid argument debug the stack trace I ve notice that the fragment creation ownerdocument createdocumentfragment line 7923 react dom js be result in a malformed fragment later when try to append this malforme fragment to the dom parentnode insertbefore tree node referencenode line 1623 react dom js it fail and throw that error I try to replace the fragment by a span element for this specific case ie11 and child window and it work could this be a solution |
facebookreact | no error when element with ref create in another element constructor in dev environment | Bug | when create an element with a ref from inside of a constructor an error be throw in production mode but not in dev mode here be a minimal sample an error only a reactowner can have ref should happen in dev and production mode this be happen in react 15 4 |
facebookreact | ismounte behavior different with create react class | Bug | do you want to request a feature or report a bug bug what be the current behavior call this ismounte in componentwillunmount in prior version would return true now it return false I believe this be untested behavior before but the new test that be add may check the wrong value l417 change this line to test for true will exhibit the behavior the fix would be to defer set the ismounte flag to false until after all mixin and the componentwillunmount method be call on the component which version of react and which browser os be affect by this issue do this work in previous version of react 15 5 x and anything use create react class be break work correctly in 15 4 x with react createclass |
facebookreact | fiber return function from render do not throw | Bug | jsx class foo extend react component render return foo class app extend react component render return foo when app return foo instead of accidentally fiber do not catch this |
facebookreact | control input allow dot | Bug | do you want to request a feature or report a bug bug what be the current behavior react allow a dot in a control input that doesn t allow change the value if the value set as a prop be a number if it s a string the issue be not present if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template in this example the first input allow a dot even though the code doesn t allow change the second input doesn t allow the dot what be the expect behavior the dot shouldn t be allow which version of react and which browser os be affect by this issue do this work in previous version of react version 15 5 4 chrome and firefox see the jsfiddle example |
facebookreact | wrong repo | Enhancement | wrong repo |
facebookreact | reacttestutil event dispatch before workinprogress statenode be set | Bug | with the following use the late alpha 10 and jsdom 9 12 0 js const reacttestutil require react dom test util const foo react createelement div null react createelement img src foo jpg reacttestutil renderintodocument react createelement foo the follow error be throw typeerror can not read property nodename of null at shouldusechangeevent user brandondail project react tester node module react dom cjs react dom development js 6310 22 at object extractevent user brandondail project react tester node module react dom cjs react dom development js 6495 9 at object extractevent user brandondail project react tester node module react dom cjs react dom development js 715 46 at object handletoplevel as handletoplevel user brandondail project react tester node module react dom cjs react dom development js 772 35 at handletoplevelimpl user brandondail project react tester node module react dom cjs react dom development js 7051 24 at batchedupdate user brandondail project react tester node module react dom cjs react dom development js 14806 14 at performfiberbatchedupdate user brandondail project react tester node module react dom cjs react dom development js 6161 10 at stackbatchedupdate user brandondail project react tester node module react dom cjs react dom development js 6152 10 at batchedupdate user brandondail project react tester node module react dom cjs react dom development js 6166 10 at object batchedupdateswithcontrolledcomponent as batchedupdate user brandondail project react tester node module react dom cjs react dom development j 6179 12 the issue be that completework call finalizeinitialchildren l275 l279 before it set the statenode l285 on the workinprogress finalizeinitialchildren eventually call setvalueforproperty for the image tag which set the src property and cause jsdom to trigger an event the top level event listener then grab that instance l178 which have no statenode which eventually trigger the error reacttestutil be likely to be use frequently with jsdom so I think it s important to support be this something that can be address in fiber |
facebookreact | yarn prettier run a too long command for os window | Enhancement | cli yarn prettier return error too long command the problem be only on window os check on window 10 x64 cli cmd |
facebookreact | implement set unknown attribute | Enhancement | we be currently warn about unknown property in the dom for example if you render js you re go to see a warning from react and foo win t actually turn up in the dom people have want support for custom attribute since forever now that we ve actually be warn for a whole release I think it s a good time to flip this behavior and to set any unknown attribute on the dom instead of skip they so the goal be that you would actually see in your dom there be just one caveat we still haven t update all fb callsite to fix this warning ideally we want to stay sync with open source version of react but I don t want react 16 to be delay because of this nor do I want delay this change until react 17 so I think we should bite the bullet introduce an internal feature flag that will differ for our fb build and enable the new behavior in the open source version some time during react 16 we ll finish update our code and remove the conditional code path I don t think anybody on the team have time to work on this right now so I d love this to be a community contribution requirement as I see they introduce a new feature flag to reactdomfeatureflag something like shouldsetcustomattribute set it to true keep the warning about unknown dom prop but only enable it if shouldsetcustomattribute be false make sure test still cover this case you can override feature flag in test see exist test concern feature flag for how to do it add new behavior of fall back to setattribute for any unknown property rather than skip they like we do now add test for it those test shouldn t need to touch the feature flag since it s the new default behavior make sure this work both for svg and html make sure fiber test pass when you create a pr there be instruction on run they this might affect server render test suite previously add by aickin you might need to change those test to verify the new behavior it s fine to only verify the new behavior there with flag set to true since we don t use server render ourselves good point from syranide issuecomment 296170676 we should still warn for know attribute that be miscapitalize it s fine if that s a different warning message than the one behind the flag send the pr please let I know if you d like to take this it could turn out a little complicated there win t be a lot of guidance from we on this so we probably can t coach a completely new contributor for this task but if you send a pr or two to react you should be able to do it update nhunzaker already start a pr on this a while back and might be able to rebase it let s discuss the plan more in more specific below issuecomment 296179889 |
facebookreact | how to render object with custom tostring | Question | I m implement a i18n library and would like to render a object with custom tostring like this const i18nobject tostring return xxx render return i18nobject but get the error invariant js 44 uncaught error object be not valid as a react child find xxx if you mean to render a collection of child use an array instead or wrap the object use createfragment object from the react add ons check the render method of app at invariant invariant js 44 do anyone know if there s any method to do this |
facebookreact | show a warning when value be provide to a checkbox input | Enhancement | do you want to request a feature or report a bug feature what be the current behavior a checkbox input can have a value prop which be most likely ignore it should be check what be the expect behavior I think we should throw a warning if a user provide a value instead of check to a |
facebookreact | can not find module reactreconciletransaction from reactshallowrenderer js in react test renderer | Bug | do you want to request a feature or report a bug bug what be the current behavior can not find module reactreconciletransaction from reactshallowrenderer js if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template yarn add dev react test renderer js component test js const reactshallowrenderer require react test renderer shallow can not find module error what be the expect behavior that reactreconciletransaction module be include in react test renderer package which version of react and which browser os be affect by this issue do this work in previous version of react 15 5 1 if this be something relatively simple I wouldn t mind make my first pr to react if give a nudge in the right direction I look already in the grunt task for build the package but nothing stand out |
facebookreact | react 16 0 0 alpha 7 do not bundle correctly in a project use rollup | Bug | do you want to request a feature or report a bug bug what be the current behavior when use rollup in a project that import the late react 16 0 0 alpha7 the bundle end up contain both react development js and react production min js and the file size be unnecessarily large my guess this happen because the entry point of react be change recently to js if process env node env production module export require cjs react production min js else module export require cjs react development js and rollup apparently can not eliminate export in dead branch even when replace process env node env with production uglify also can not remove the dead code because rollup seem to hoist require d stuff to the top level online demo try build react next use this tool that use rollup to report package size compare that to search for just react if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem step to reproduce 1 import react in any project that use rollup to bundle 2 use rollup plugin replace to replace process env node env with production 3 use rollup plugin node resolve rollup plugin commonj and uglifyjs plugin so that rollup understand commonj export and minify stuff 4 check the bundle size it be 47 5 kb what be the expect behavior size should be much small which version of react and which browser os be affect by this issue do this work in previous version of react the size be fine when use 15 4 2 because the entry point read as js use strict module export require lib react |
facebookreact | typeerror can not read property firstchild of null at precachechildnode react dom js 6619 | Bug | with 15 5 0 rc 1 I get uncaught typeerror can not read property firstchild of null at precachechildnode react dom js 6619 at getnodefrominstance react dom js 6714 at reactdomcomponent trapbubbledeventslocal react dom js 5772 at callbackqueue notifyall react dom js 948 at reacttestreconciletransaction close react dom js 12207 at reacttestreconciletransaction closeall react dom js 14993 at reacttestreconciletransaction perform react dom js 14940 at reactupdatesflushtransaction perform react dom js 14927 at reactupdatesflushtransaction perform react dom js 13047 at object flushbatchedupdate react dom js 13130 |
facebookreact | ref be not pass through a hoc | Duplicate | do you want to request a feature or report a bug feature what be the current behavior the parent component of a child component wrap in a hoc can not assign a ref attribute to the child component the ref attribute instead refer to the hoc in order for the parent component to reference the child component it must use some of the below popular workaround onref prop innerref prop getinstance func what be the expect behavior in accordance with the decorator pattern a child wrap with a hoc should not be less accessible than a child not wrap with a hoc it be expect that the ref attribute pass through the hoc |
facebookreact | react addon create fragment destructure assignment remain in distribute code | Bug | do you want to request a feature or report a bug bug what be the current behavior when run npm run build I get the follow error create an optimize production build fail to compile static js main 6a1ea184 js from uglifyjs syntaxerror name expect react addon create fragment index js 343 0 error command fail with exit code 1 info visit for documentation about this command the react addon create fragment index js 343 be a line with destructure assignment I think code in the distributable should be es5 if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template use create react app create an app add material ui npm install save material ui import drawer import drawer from material ui drawer what be the expect behavior this will build properly with npm run build which version of react and which browser os be affect by this issue do this work in previous version of react unknown |
facebookreact | bug update background style ignore backgroundsize | Duplicate | what be the current behavior I have a react component render a with background and backgroundsize style when the user via the interface change the background url the background size style be no long apply here s a fiddle that demonstrate the issue note how click the image container cause the grid to become twice as large 40px size be ignore and also cause the large background to start tile cover ignore if you look at the generate dom you can see that the background value be no long a composite of the background background size declaration as it be in the first render but just reflect the background value what be the expect behavior I would expect react reactdom to combine these two style rule in a consistent way follow the two render call which version of react and which browser os be affect by this issue do this work in previous version of react unknown currently happen in react 15 4 1 and in the fiddle I ve test in both safari and chrome and have verify this isn t a browser issue |
facebookreact | stop mask context | Enhancement | feature return all contextprop available via a wildcard prop this would be helpful for those who want to do shouldcomponentupdate comparison with prop state and context possible solution static contexttype true or static contexttype or static contexttype all true |
facebookreact | reactjs not render | Invalid | capture |
facebookreact | warn about overwrite react component s instance property updater | Enhancement | do you want to request a feature or report a bug feature what be the current behavior react component silently overwrite instance property updater js base class helper for the update state of a component function reactcomponent prop context updater this prop prop this context context this ref emptyobject we initialize the default updater but the real one get inject by the renderer this updater updater reactnoopupdatequeue what be the expect behavior it would be very useful to raise a warning in dev mode for such a case which version of react and which browser os be affect by this issue do this work in previous version of react react v15 4 2 do this work in previous version of react yes |
facebookreact | fiber check for requestanimationframe throw when react dom be require on the server | Bug | do you want to request a feature or report a bug bug ish what be the current behavior when do server side rendering with react require react dom which transitively require reactdomframeschedule js throw an exception because raf be not define invariant violation react depend on requestanimationframe make sure that you load a polyfill in old browser at invariant app node modules fbjs lib invariant js 44 15 at object app node module react dom lib reactdomframeschedule js 30 3 this can happen if you have a universal component that have top level import of client side librarie like react router scroll that require react dom instead of react dom server what be the expect behavior I would expect not to get this error unless requestanimationframe be actually call ex lazily check for raf and define ric which version of react and which browser os be affect by this issue do this work in previous version of react react 16 0 0 alpha 3 on node 7 7 1 this start happen in alpha 3 which ship and enable fiber |
facebookreact | paste text in text box do not fire change event on ie11 | Bug | I find a bug in ie11 react version be 15 4 0 pasting text in text box do not fire change event on ie11 |
facebookreact | fiber investigation what internal have direct dependency on stack module | Question | after some research the follow module in the react codebase have some form of direct dependency on a react stack module ideally we want to move away form use internal module require and use public api require where possible reacttestutil src test reactshallowrenderer js there be a pr already open that should resolve this lelandrichardson 8982 spicyj say renderer src renderer test reactupdate test js only one test make use of reactupdate directly move the require to be inline within the test itself spicyj say this one just test internal and doesn t test anything observable originally be add as a part of a very minor perf improvement can be delete renderer reactdom src renderer dom share test reactmount test js a test in this suite use reactmount instancesbyreactrootid spicyj say this test be add because the old devtool rely on this and it be important to not break they but dan rewrote the integration so the fiber devtool don t need this and this test be fine to delete src renderer dom share test reactdomcomponent test js two test createopentagmarkup and createcontentmarkup require stack module spicyj say these test should be rewrite in term of public apis src renderer dom share test reactserverrendering test js re visit once we have ssr work spicyj say src renderer dom share test reactdomidoperation test js only have a single innerhtml whitespace test spicyj say let s rewrite this one in term of public apis though it can probably move into reactdomcomponent test let s ensure that both initial render and update work properly since those historically use different codepath and might also diverge in the future renderer reactdom ssr src renderer dom reactdomserver js re visit once we have ssr work spicyj say renderer reactart src renderer art reactartstack js a couple of stack module be require by art spicyj say no need to worry about these we ll delete these when we delete stack bvaughn say renderer native src renderer native reactnativereconciletransaction js src renderer native reactnativemount js src renderer native reactnativestackinjection js src renderer native reactnativebasecomponent js src renderer native reactnativestack js spicyj say no need to worry about these we ll delete these when we delete stack bvaughn say script script bench extract component js should we refactor to use the public api instead spicyj say we don t really have a public api for reflect on inspect react tree which be what this script almost a bookmarklet do so we will need to rewrite this on top of fiber if we want to use it again but this isn t super important so for now this be okay to leave use stack module and it will only work with stack until someone want to use it and upgrade it to fiber |
facebookreact | change warn for to suggest an empty array rather than empty string | Bug | do you want to request a feature or report a bug bug what be the current behavior set the value to on a with size 3 do not deselect the currently select option if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template jsfiddle what be the expect behavior after render a with the value set to an empty string I expect there to be no selection in the render select box mainly this expectation come from this react warning when I use null instead of warn value prop on select should not be null consider use the empty string to clear the component or undefined for uncontrolled component in the fiddle if I change this line javascript let newselection nowhidden this state select to javascript let newselection nowhidden undefine this state select I get the behavior I expect which version of react and which browser os be affect by this issue do this work in previous version of react I ve get this with react 15 3 0 and whichever version be use in the fiddle I don t know if it work in previous version this be test use chrome 56 on os x |
facebookreact | dynamic rendering of react component | Invalid | in my case I have a list of component name in left side of the window with a sign once I click the sign the component should get display if the list be like component 1 component 2 component 3 component 4 component 5 if my click order be 3 2 5 4 1 the component should render in the follow order component 3 component 2 component 5 component 4 component 1 how should I do it |
facebookreact | problem with click event on ie and edge | Bug | I would like to point out a specific behaviour when use react with ie and edge I be build a user computer chat application where user be present prompt to navigate they through a user journey one of the step be where the user enter a street name postcode and they be present a list of address to choose from therefore I have a step with a text input field which after the user submit disappear for a list of address to appear I have an example where there be two way for submit one be by click on a send button and the other be by hit enter on a keyboard when the user use the mouse submission everything be ok on all browser however if the user press the keyboard key then click event do not work as expect on ie and edge my assumption be that the problem come because the field that have the focus be delete from the dom but I can t be sure to make thing strange I could only reproduce the issue by put the address in the list in two nest div element with display flex set in the style here be a link to a fiddle expect after a value be enter in the input and enter be press or send be click I would expect the list of address provide to be clickable actual when a value be enter end send be click with the mouse the event on the list item can be track when a value be enter and enter be press the event on the list can t be track I be use react 15 4 2 with ie 11 713 10586 0 and edge 25 10586 672 0 edgehtml 13 10586 |
facebookreact | unexpected exception on use react perf tool | Bug | I find this exception when try to use react perf tool with component that internally use reactdomserver rendertostaticmarkup js uncaught typeerror can not read property parentid of undefined at at array foreach native at at array foreach native at getwasted at object printwaste at eval eval at transform run 35 19 at exec at runscript minimal reproducible case a different but mostly relate exception be happen when react perf be use in the url you may be ask yourself why I need to use reactserverdom together with reactdom I need it to render a svg into a blob and then use that s blob uri as background url style attribute I have also other use case when I need to render to string instead to directly to the dom so I think that be reasonable usage |
facebookreact | bump fbjs to 0 9 x | Enhancement | probably lot of react app depend on babel runtime perhaps directly or maybe indirectly this can problematic though because it can cause such app to depend on two version of core js 1 your babel use react app babel runtime 6 22 0 core js 2 4 0 l9 2 react fbjs 0 8 4 l26 core js 1 0 0 l63 these two version aren t semver compatible so it mean a project that depend on babel runtime and also react will have two copy of core js in use a concrete example of this be a react app that also depend on relay l32 there be probably many other such example though it d be nice to collapse this dependency into a single version of core js react could bump its dependency to the late fbjs which be fbjs 0 9 0 alpha 1 l61 that s alpha right now but it s be alpha for 7 month and probably you guy can arrange a stable release if you want to see also |
facebookreact | onbeforeinput fire after edge update the dom | Bug | do you want to request a feature or report a bug bug what be the current behavior in edge the onbeforeinput event be fire after edge have already make change to the dom negate the purpose of the event and break the assumption of component build on this event such as draft if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template demonstrate the issue in general but to see the effect on other component consider these step 1 go to 2 type hello world 3 bold hello 4 underline the space between the word 5 select both hello and the space and press a 6 the entire control s text be replace with a 7 hit undo several time to observe far break state until finally react fail with a notfounderror in removechild this issue be open in draft because the core issue be that onbeforeinput be misbehave on edge and so break draft s assumption what be the expect behavior onbeforeinput should fire before any change occur in the dom which version of react and which browser os be affect by this issue do this work in previous version of react this repro in the late version of draft the root cause here be the same root cause as in 7269 although that issue no long repro the fix reference in that issue 7270 fix this issue as well |
facebookreact | proptype shape should throw if the object have more property than specify | Duplicate | if I have setup like mycomponent proptype compprop react proptype shape propa react proptype string isrequire propb react proptype string isrequire isrequire when I call it like const propsobj propa propb unwantedprop I expect it to show warning as the pass object do not have the exact shape as require please advice |
facebookreact | miss object assign licence please check other | Bug | do you want to request a feature or report a bug bug what be the current behavior miss copyright licence if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template see what be the expect behavior not a lawyer facebook should know how to show mit accord to their policy which version of react and which browser os be affect by this issue do this work in previous version of react check current version 15 4 2 all os and this be probably in previous version |
facebookreact | react dom server broken build for version 15 4 1 | null | do you want to request a feature or report a bug bug what be the current behavior it break the code execution file react dom dist react dom server min js javascript 117 function t n r use strict var o e secret internal do not use or you will be fire n export o reactcurrentowner beautify javascript function t n r use strict var o e secret internal do not use or you will be fire n export o reactcurrentowner output javascript typeerror can not read property reactcurrentowner of undefined at object r 117 what be the expect behavior var reactdomserver require react dom dist react dom server min js with the desire goal of have a server side rendering for production which skip unnecessary comment warning etc react documentation page installation which version of react 15 4 1 platform nodejs server side rendering do this work in previous version of react I don t know |
facebookreact | delimit dynamic part of the warning message with newline | Enhancement | as propose in issuecomment 271311978 I think we should find the warning where we add a dynamic part to the end like check the render method of and delimit it with two newline this way it s much easy to recognize in the middle of a bunch of error this be a good first issue to contribute you would need to find warning call that include additional info like check the render method of and add a couple of newline you d also need to change the test in case they fail |
facebookreact | tutorial link expire | Duplicate | line 19 react docs tutorial tutorial md link to |
facebookreact | be instance point to reactinternalinstance reactinternalinstance pointing to instance expect structure | Question | I be play with the example to understand the internal code flow of react s setstate I notice that reactcompositecomponentwrapper object have reference to instance object which in turn have reference to the same screenshot s console reactcompositecomponentwrapper object as reactinternalinstance be that an expected structure |
facebookreact | break link in react tutorial | Bug | do you want to request a feature or report a bug report a bug what be the current behavior break link in the first section of if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template n a what be the expect behavior link should go to a work version of tic tac toe on codepen which version of react and which browser os be affect by this issue do this work in previous version of react n a |
facebookreact | native event stoppropagation outside of react root cut out react event | Enhancement | we need to host a standalone react component draftjs editor inside a html5 application which will run on other js framework or even plain js or jquery the code of the application be beyond our control we be just a vendor of a component which add some content part of which be this react base editor anyway the most important part be that we need to add the component with the follow code to an exist div const editor reactdom render react createelement editorcomponent prop divelem editorcomponent be a regular react component with some onclick event attach to its content primarily toolbar button for the editor I learn that react event model and its bubble execute independently after the event bubble all the way up to the document and that if ev stoppropagation be call on native event react event win t execute at all that be understandable for situation where document contain only the react app component at its root and no other content mean you have control over all event on the page from react code however when react component be just a small fraction of the entire page it may be severely influence by the rest of the page the problem be that any event handle code above the component which call ev stoppropagation cut of the event of that small fraction even that the event originate from the react component scope that influence code could very well be just some jquery plugin so even author of the page may not be able to rewrite their code for some special event handle here be a fiddle to demonstrate that I believe that the point where the event chain break allow react to execute its event should be the root element of react component rather than the whole document this way react root element could be consider an isolation edge of the react application component reactevent I track the react event registration down to function reactdomcomponent ensurelisteningto where I find the follow code var doc isdocumentfragment containerinfo node containerinfo ownerdocument listento registrationname doc I try to change containerinfo ownerdocument to containerinfo node to register the react event chain to the root of the react container and try it for several basic event onclick onmousedown up and it seem work for we as expect react event be not influence by stop propagation at the native event outside of react component root so the two differently implement part of the application can coexist in peace I be not sure why ownerdocument be choose over node in the implementation and if change it to node could break something important please advise if the propose solution seem viable in that case consider a change to that or for what reason you wouldn t recommend it |
facebookreact | shorthand css property can cause style inconsistency | Duplicate | I m report a bug what be the current behavior 1 render a host component with a style that contain both a shorthand css property and an over write long form of the property eg overflow and a conflict overflowx and or overflowy property 2 update the host component re render with the same shorthand property eg overflow but remove the long form property eg overflowx 3 the host component style be now invalid example this bug can be reproduce here update I have since update the plnkr to use border instead of overflow since it make the problem more immediately obvious to spot example 1 render style overflow hide overflowy auto 1 render style overflow hide 1 expect 1 actual alternate example 1 render style overflow auto overflowx hide overflowy hide 1 render style overflow auto 1 expect 1 actual you can also reproduce this bug with property like margin padding border etc caveat note that if the shorthand value change between render thing work as expect because react explicitly update the shorthand style I know this be very edge case behavior and so may not be worth fix I originally notice it by way of issue bvaughn react virtualize issue 525 which version of react browser os be affect this bug reproduce in chrome firefox and safari use react 15 4 1 as well as the unreleased reactdomfiber renderer |
facebookreact | composition event chinese japanese ime problem in control component input textarea | Bug | do you want to request a feature or report a bug both what be the current behavior there be a exist issue 3926 but it be just one of the problem in some kind of browser I have upload the detail demo file test result and temporary solution in react compositionevent the main problem be when user type these word from ime chinese japanese or maybe korean and do something like search the database or filter out from some datum sometimes these function will be unworkable for example if user type ni during the composition session maybe it will be one of in chinese or one of in japanese but in this moment the change event also be fire if the search or filter function of the application be design to be invoke when change event occur there maybe something wrong logically these function should be invoke after user finish the composition session in react there be three synthetic event oncompositionend oncompositionstart and oncompositionupdate if the input component and be uncontrolle we can use they to help onchange to capture the text correctly the only different point be google chrome change its event sequence after v53 check cinput js and ctextarea js file but if these input component be control it will be hard to solve the problem because these the value of a control component be come from state we can t modify state directly and the only way to update state be use this setstate to schedule update but this setstate may be asynchronous after test I find different os browser could have different result I have write some code to solve it but I think it isn t a good solution it use the browser detection and two property of the state object one be for input another be for internal function search filter etc it can t just use one property of the state object because I can t stop any change event state need it to update the value of the input element if I stop some change event during composition session I would get nothing after type these word from ime if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template you can use online test demo or use a normal input component control uncontrolle to test what be the expect behavior the input and textarea control component in react should ensure these fire change and composition event be consistent in different browser I find there be 3 different result event fire sequence at least which version of react and which browser os be affect by this issue do this work in previous version of react react 15 4 1 browser chrome firefox safari opera ie edge os macos win7 win10 |
facebookreact | able to create new event | Duplicate | I want a feature to be able to extend the syntheticuievent so that I can add my own event when require thank you |
facebookreact | textarea onfocus stoppropagation incorrect cursor render on firefox | Bug | what be the current behavior use stoppropagation in an onfocus event on a textarea or its parent cause the cursor to disappear or render at an incorrect location in firefox you can see the vanish cursor at this fiddle there be no issue on chrome and edge but firefox 50 1 0 have this problem in my full app the cursor doesn t vanish but rather move elsewhere italic be placeholder text I have not reproduce this behavior in the fiddle what be the expect behavior it s hard to say what the expect behavior be since the real focus event do not bubble here a fiddle to show that the cursor position be not affect when the event be stop in a vanilla js environment which version of react and which browser os be affect by this issue do this work in previous version of react the fiddle show the issue with 15 4 1 on ff on window 10 I see the same issue on 15 3 why stoppropagation before I get eat alive for use this I ll just say that have a non bubble focus event simplifie one of the interaction I m set up specifically my app have a bunch of widget that can be mark active when a user click into a field in the widget that widget should be mark active however widget can be nest in other widget in which only the inner most widget should be mark active |
facebookreact | 15 4 break default param behavior on componentdidmount in production build | Bug | do you want to request a feature or report a bug bug what be the current behavior only when node env production null be be pass as first argument to componentdidmount this become an issue when a default param be specify for componentdidmount from the backtrace from the componentdidmount call it seem like the difference between 15 3 and 15 4 be the extra arg argument in this line l73 repro clone the project then cd into it cd react 15 4 break default param yarn npm run dev open localhost 9966 with an es6 support browser and open the console it should log a message kill the wzrd process then run npm run prod then refresh localhost 9966 the console should log null what be the expect behavior they should either both log this should be log or they should both log null development build and production build shouldn t differ in this regard which version of react and which browser os be affect by this issue do this work in previous version of react 15 4 everything be ok in 15 3 |
facebookreact | click handler can get call twice in non prod mode | Bug | I think this be a bug that only happen in non prod mode I notice this use the react dropzone library but I think I find a simple use case to reproduce the problem if you check out the fiddle you can see that click handler be call twice even though the element be only click once here be an example show it work and not work I believe it have something to do with the outer div s click listener and this chunk of code js if true to help development we can get well devtool integration by simulate a real browser event if typeof window undefine typeof window dispatchevent function typeof document undefine typeof document createevent function var fakenode document createelement react reacterrorutil invokeguardedcallback function name func a var boundfunc func bind null a var evttype react name fakenode addeventlistener evttype boundfunc false var evt document createevent event flowfixme evt initevent evttype false false fakenode dispatchevent evt fakenode removeeventlistener evttype boundfunc false I test this on chrome mac I have also see this behavior on react 14 8 |
facebookreact | form submit on button type button click | Bug | do you want to request a feature or report a bug report a bug what be the current behavior strange behavior a form be submit when I click a button type button the follow sequence induce this behavior click on button type button call setstate button be transform into a button type submit the form submission handler be call what be the expect behavior a button type button be not expect trigger form submit which version of react and which browser os be affect by this issue do this work in previous version of react I reproduce with and 15 4 0 with google chrome v54 and firefox v50 see this fiddle this behavior do not happen if I add an unique key property to both my button |
facebookreact | ie10 trigger onchange twice when replace a text selection | Bug | do you want to request a feature or report a bug bug what be the current behavior type text 123 in an input select the whole text type the a key when hit the a key onchange be trigger twice one time event target value be the second time it s a this only happen in ie10 ie9 and ie11 both behave correctly demo fiddle ie10onchange what be the expect behavior when hit the a key onchange be trigger only one time event target value should be a which version of react and which browser os be affect by this issue do this work in previous version of react react 15 4 1 possibly also old version ie10 window 7 |
facebookreact | add component stack to the contenteditable warning | Enhancement | feature warn a component be contenteditable and contain child manage by react it be now your responsibility to guarantee that none of those node be unexpectedly modify or duplicate this be probably not intentional it would help heap if I would know which component be cause this |
facebookreact | invariant violation when render use both reactdom and reactdomserver | Bug | use both reactdom render and reactdomserver render w cause an invariant violation in react 15 4 1 see console on there be javascript react dom js 18121 warn exception throw by hook while handle onsetchildren invariant violation item must have be set invariant violation item must have be set at invariant notice that I render completely different component with each of the render method some criterion have to be meet for the warning to show like at least two nest component to I it seem like the reactdomserver be mess with itemmap in the regular react and the ids of component doesn t match |
facebookreact | onchange do not work well with ie11 at japanese ime in react 15 4 0 | Bug | untitled2 I m try to make a simple text box component with a suggestion feature however in ie 11 there be an event that the japanese ime conversion arbitrarily decide I do not press the enter key I examine it a little by myself but this seem to have occur only in ie 11 it seem that it have not occur in other browser such as chrome and old ver such as ie 10 react version be 15 4 0 there seem to be similar issue in the past but that bug have already be fix be this another bug or maybe I do not like how to make it suggesttextbox const suggesttextbox react createclass timer null getinitialstate function return focus false suggestlist value getsuggestlistfromapi getsuggestlistfromapi function value request api and get response common apicall type get url api hoge datatype json data keyword value cache false callback function result set the state this setstate suggestlist result data list activeitem null bind this handletextboxchange handletextboxchange function e this setstate value e target value suggestlist if this state focus if e target value if this timer window cleartimeout this timer this timer window settimeout function this getsuggestlistfromapi e target value bind this 300 handlefocus handlefocus function e this setstate focus true getsuggestnode getsuggestnode function var listnode this state suggestlist map function item idx return item name bind this if listnode length 0 return listnode else return null render function let suggestnode this getsuggestnode return suggestnode |
facebookreact | fail to update dom style attribute | Duplicate | do you want to request a feature or report a bug bug what be the current behavior style attribute be not update correctly when we set padding and paddingtop at the same time and then re render with only padding same issue with border I suppose that it would be the same with margin not test example what be the expect behavior the dom element style should be the last render one and should not be affect by the previous style value which version of react and which browser os be affect by this issue do this work in previous version of react test on chrome 54 with react 15 4 and 15 3 2 |
facebookreact | ref callback argument be null | Invalid | do you want to request a feature or report a bug a bug what be the current behavior the ref callback get call with null as argument instead of an instance of the component this only occur when you write the component name start with an uppercase character pascalcase if you write the component start with a lowercase character camelcase everything work as expect this jsfiddle demonstrate how you get a null argument and this demonstrate how you get a correct reference as you can see I just rename button to lowercasebutton what be the expect behavior it should always pass the component instance as argument to the callback which version of react and which browser os be affect by this issue do this work in previous version of react this occur in v15 4 0 and v15 3 1 I didn t test any other version |
facebookreact | preserve browser input behavior | Bug | this pr close 7328 in ie edge if you set the value of a password input it knock off any of the helper like the unmasker and save password prompt I basically just wrap the bulk of setvalueforproperty in a condition node propname value which be similar to the old have side effect check diff f04a397aa63ac69c28dab46e9863bb90l152 if it s too aggressive or need to be scope down that s cool too |
facebookreact | number input with defaultvalue do not accept decimal input | Duplicate | do you want to request a feature or report a bug report a bug what be the current behavior when use a number input that have a defaultvalue you can not enter a decimal value when attempt to type a decimal the cursor be move to the beginning of the input this behavior be not observe when there be no defaultvalue give if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template what be the expect behavior the input should allow you to type a decimal which version of react and which browser os be affect by this issue do this work in previous version of react this be happen with react 15 3 2 it do not happen in 0 14 x |
facebookreact | ie11 findparent fail with unable to get property reactinternalinstance of undefined or null reference | Invalid | do you want to request a feature or report a bug bug what be the current behavior exception be throw render stop if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template doesn t seem to be determinstic but it happen only in ie at least in ie11 what be the expect behavior should not throw an exception and continue render which version of react and which browser os be affect by this issue do this work in previous version of react react 15 2 1 ie 11 on window 8 1 |
facebookreact | detect click outside view component in react native | Invalid | I want to compress a view component if I click outside that view be there any way of do this |
facebookreact | fiber spill over from child reconciliation | Enhancement | this be spill over from 7707 that I don t plan on do in the initial batch fix text node merging edge case search forward to find the next sibling swap out the end of the text node to the sum of the previous value of the sibling this trick let we avoid back reference have tag include child update so that you can recalculate all child if need e g coroutine alternatively pass the near host or coroutine down the tree so that it can be quickly flag as child change and insert move can be avoid to be add to the side effect list for coroutine the second option be probably well possibly use two side effect list so that two pass be not need and forward order be possible x remove the notion of output unnecessary extra traversal and require duck typing to know which be terminal reconsider if we need backpointer there be several optimization that be possible with they but use more memory |
facebookreact | a group of radio button require all to have defaultchecke attribute to work properly in firefox | Bug | |
facebookreact | unexpected interleaving of subtree parent lifecycle method | Bug | repro in the example a click handler in the subtree queue an update for both the the subtree and parent component with the follow ordering of lifecycle method parent will update child will update subtree will update child do update parent do update subtree do update if the parent component unmount the subtree in componentdidupdate this will cause the subtree to be unmounte by the time that its componentdidupdate method be call parent will update child will update subtree will update child do update parent do update unmount subtree subtree will unmount subtree do update what be the expect behavior probably this parent will update child will update subtree will update child do update subtree do update parent do update |
facebookreact | problem when change value of uncontrolled number input in chrome | Duplicate | do you want to request a feature or report a bug bug what be the current behavior here be jsfiddle just try to edit the default value 2 34 to something else like 3 45 as soon as I insert dot cursor star to jump in input which version of react and which browser os be affect by this issue do this work in previous version of react it be not work in chrome v53 on react v15 3 2 and also v15 3 1 I do not try to go very far back but I try it on old jsbin with react v0 13 2 and that work on firefox it be correctly work |
facebookreact | receive outside event without leave react s system | Duplicate | this be a feature request right now the only way to respond to outside world event be to leave the react s event system and add a native dom listener this be bad since it will require more mental overhead when you have to work with this you need to think about your event listener receive a native event or a react synthetic event it will also simply not be possible for compute syntheticevent s e g onchange it also make it very hard for react event handler to interrupt the dom handler consider the following example where it s not intuitive why the react listener can not stop propagation to the document spoiler react also listen on document that s why you d have to use syntheticevent nativeevent stopimmediatepropagation js var example react createclass render function return document addeventlistener keydown function alert why do this still fire reactdom render document getelementbyid react an example for when you want to deal with outside event be a simple drawing tool that must listen on keyup to stop the drawing process to solve this problem I propose a new public api something like an eventroot it should behave like a regular dom node so that you can addeventlistener and removeeventlistener but it s callback will receive the syntheticevent it will get call when trigger a two phase dispatch it respect the capture and bubble order as well as stoppropagation everything you d expect when listen on document for the above example you d only have to replace document with the new event root the stoppropagation can now correctly be apply |
facebookreact | notification index please ignore this issue | Question | how to refer to the dom element within jsx prop without use ref same as class mycomponent extend component constructor prop this state selectedoption option1 getclassname e return e target textconent this state selectedoption select onnodeselecte e this setstate selectedoption e target contexttext return I be and still be very much tempt to pass this as to refer to the current dom element option1 option2 option3 option4 23 2 2017 update the answer be no you can t use this this always stand for the current component no matter where you use it the correct approach be to pass the this object explicitly e g option1 you know that this refer to option1 so you can pass the value directly without use this keyword bochen2014 |
facebookreact | bug false positive plain object warn | Bug | there be a bug in the logic for determine if prop be a plain object this bug result in a false positive flooding the console with hundred of instance of this warning expect prop argument to be a plain object property define in its prototype chain will be ignore the code that s fail be in reactelement js line 210 in the v15 3 1 branch l210 line number be probably different in master config proto null config proto object prototype this fail when the prop object be create in one iframe but use an instance of react from another frame each browser window tab frame have it s own instance of the object constructor for instance document queryselector iframe contentwindow object object always result in false check out this demo which show the false positive warning message |
facebookreact | react cloneelement this prop child this prop copy the child into the this prop child of child itself | null | please run the js fiddle give above cloneelement copy the child into prop child of the child itself and if the child also render its child use the same method an infinite loop be establish and the browser maximum call stack size be exceed ideally while clone the child property of the prop of the child should be leave untouched |
facebookreact | bug miss warning about unknown prop unknown dom property | Invalid | actual miss warning for unknown dompropertie in development miss warning for unknown prop in development expect unknown dompropertie log warning unknown prop log warning affect version software version test react 15 3 1 15 3 0 seem to work as intend runtime node 6 5 0 link affect browser chrome test link |
facebookreact | mouseenter event trigger at disabled form element | Duplicate | do you want to request a feature or report a bug bug what be the current behavior when mouse enter disabled form element trigger mouseenter event but it not trigger mouseleave when mouse leave from the element if the current behavior be a bug please provide the step to reproduce and if possible a minimal demo of the problem via or similar template first button render by react what be the expect behavior don t trigger mouseenter event when form element disable which version of react and which browser os be affect by this issue do this work in previous version of react 15 3 0 yes |
facebookreact | radio button be not correctly check when use multiple list of radio button | Bug | do you want to request a feature or report a bug bug what be the current behavior when there be two list of radio button and they be conditionally show the correct radio button isn t always check in the provide jsfiddle I have create two list and put a button before they to toggle between the two list you can see when switch to the second list of radio button none of the radio button be check even though the second one should be check base on the state what be the expect behavior the correct radio button should be check the follow jsfiddle show the behaviour with react 15 3 0 where it still work which version of react and which browser os be affect by this issue do this work in previous version of react react 15 3 0 it work react 15 3 1 it be break |
facebookreact | bug onchange fire too often when use range slider | Duplicate | react version 15 3 0 chrome version 52 0 2743 116 m 64 bit current behavior react fire onchange event for with type range even when the browser s input change event do not fire example html js const container document getelementbyid container class app extend react component componentdidmount this ref slider addeventlistener change event console log event target value render return console log event target value reactdom render container try it here expect behavior observe the console output while drag the slider for the first slider the behavior be incorrect and it fire onchange while drag the slider for the second slider the behavior be correct and can be see as a workaround for the incorrect behavior reference |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.