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

Comments

Projects
None yet
3 participants
@danijelGombac
Copy link
Contributor

danijelGombac commented Aug 27, 2015

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

This comment has been minimized.

Copy link
Contributor

danielkerr commented Aug 27, 2015

there is no redirect on the review form.

@danijelGombac

This comment has been minimized.

Copy link
Contributor Author

danijelGombac commented Aug 27, 2015

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

danielkerr commented Aug 28, 2015

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

@danielkerr

This comment has been minimized.

Copy link
Contributor

danielkerr commented Aug 28, 2015

it does it on shipping

@danijelGombac

This comment has been minimized.

Copy link
Contributor Author

danijelGombac commented Aug 28, 2015

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

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

@danielkerr danielkerr closed this Aug 28, 2015

danielkerr added a commit that referenced this issue Aug 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.