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

FormItem: fix the line-wrapping problem of form input under IE 11 #21429

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lyswhut
Copy link

@lyswhut lyswhut commented Nov 2, 2021

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

Fix: #21427

此问题是由于对label容器的宽度计算不正确导致的,IE 11下计算其子元素宽度时,padding-right没有被包括在内,导致右侧input框的margin-left太小而换行,现在改成直接计算整个label容器的宽度即可修复此问题。

examples/play/index.vue代码:

<template>
  <div style="margin: 20px;">
    <el-form label-width="auto">
      <el-form-item label="活动名称">
        <el-input />
      </el-form-item>
    </el-form>
  </div>
</template>

修复前:
image
image

修复后:
image
image

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

Successfully merging this pull request may close these issues.

When the label width attribute of the [bug report] form component is auto, the input is wrapped under ie 11
1 participant