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

Wrong redirect #3276

Closed
danijelGombac opened this issue Aug 27, 2015 · 6 comments
Closed

Wrong redirect #3276

danijelGombac opened this issue Aug 27, 2015 · 6 comments

Comments

@danijelGombac
Copy link
Contributor

On shipping estimate and review form, when press enter and input field is focused redirected on home page. Maybe also on some other forms . I didn't checked.

@danielkerr
Copy link
Member

there is no redirect on the review form.

@danijelGombac
Copy link
Contributor Author

On Firefox and Chrome I try and when click on name field and press enter redirect me on home with form values in url.

@hotwer
Copy link

hotwer commented Aug 27, 2015

Yes, there is a bug on checkout/cart route.
The $shipping variable is populated with the index of total/shipping controller.
Since the shipping is a formulary...

<form class="form-horizontal">
    // zone code...
    <div class="form-group required">
      <label class="col-sm-2 control-label" for="input-postcode"><?php echo $entry_postcode; ?></label>
      <div class="col-sm-10">
        <input type="text" name="postcode" value="<?php echo $postcode; ?>" placeholder="<?php echo $entry_postcode; ?>" id="input-postcode" class="form-control" />
      </div>
    </div>
    <input type="button" value="<?php echo $button_quote; ?>" id="button-quote" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
</form>

... The default way the browser handles the enter (since there's button in the formulary), on formularies, it's to submit with default settings (it performs a GET call with and empty action) and probably review have the same issue.

The problem is, the button is supposed to be performing an ajax call.

Either the way is to handle the enter press on any fields, to perform the button click, os just prevent the default submit action.

To be honest, I think it's better to turn the enter action to behave as clicking the button, but's that's just my opinion.

@danielkerr
Copy link
Member

it wont submit the form if the button is set to type button.

@danielkerr
Copy link
Member

it does it on shipping

@danijelGombac
Copy link
Contributor Author

This is url after click on name field and press enter in review form:

http://localhost/gombac_2/index.php?name=&text=

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

3 participants