on develop help sign in
Add minor workaround
commit2e78473818508ec2d8965e4458b0d175774fce28 authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 3 Mar 2015, 11:41 (12 years ago) parent1392582
1 file changed+2−1
src/Reflex/Dom/Widget/Basic.hs+2−1
src/Reflex/Dom/Widget/Basic.hs+2−1
@@ -129,9 +129,10 @@ dyn child = do
129129widgetHold :: MonadWidget t m => m a -> Event t (m a) -> m (Dynamic t a)
130130widgetHold child0 newChild = do
131131 startPlaceholder <- text' ""
132− result0 <- child0
132+ result0 <- child0 -- I'm pretty sure this is wrong; the void actions should get removed when the child is swapped out
133133 endPlaceholder <- text' ""
134134 (newChildBuilt, newChildBuiltTriggerRef) <- newEventWithTriggerRef
135+ performEvent_ $ fmap (const $ return ()) newChildBuilt --TODO: Get rid of this hack
135136 childVoidAction <- hold never $ fmap snd newChildBuilt
136137 addVoidAction $ switch childVoidAction
137138 doc <- askDocument