Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localstorage values disappear on link follow #15

Closed
mithereal opened this issue Mar 17, 2017 · 3 comments
Closed

localstorage values disappear on link follow #15

mithereal opened this issue Mar 17, 2017 · 3 comments

Comments

@mithereal
Copy link

i have form vars stored in localstorage ie address:xxxxxxx
when i follow a link like
var $link = $('#start_quote');
up.follow($link);
all that is left is the keys the values are nulled

@triskweline
Copy link
Contributor

I'm afraid I cannot reproduce the issue.

Unpoly is not using localStorage.

Can you provide a minimal example to reproduce?

@mithereal
Copy link
Author

mithereal commented Mar 20, 2017

sorry disregard i fixed the issue, however i have one that might be related or at least not documented i need to attach event handelers to a modal created with up-modal the html which is loaded as a partial via vanilla ajax looks like this
`



Bed Room

the modal works but i cannot attach event handelers
the modal thats inserted is

My House
Living Room
        <div class="room_block">
            <img src="">
            <label>Bed Room</label>
        </div>


        <div class="room_block">
            <img src="">
            <label>Bed Room</label>

        </div>

        <div class="room_block">
            <img src="">
            <label>Bed Room</label>

        </div>
Available Rooms
Kitchen
<div class="room_block">
    <img src="room.image">
    <label>Bedroom</label>
` the js i have tried is ` $(document).on("click",'.room_block', function(){ alert('clicked'); }); ` however it never fires all my scripts are on a layout page the only thing i am changing is the content block with ajax

@triskweline
Copy link
Contributor

Although the canonical way to hook up scripts in Unpoly is using compilers, I see no reason why your event handler wouldn't fire.

Are you sure the line $(document).on(...) is executed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants