The hack below in core/misc/dialog/dialog.ajax.js should hide some inputs, but does not work correctly, the views that ends up generating an unnecessary extra space

Problem/Motivation

// Hidden form buttons need special attention. For browser consistency,
// the button needs to be "visible" in order to have the enter key fire
// the form submit event. So instead of a simple "hide" or
// "display: none", we set its dimensions to zero.
// See http://mattsnider.com/how-forms-submit-when-pressing-enter/
var $originalButton = $(this).css({
  width: 0,
  height: 0,
  padding: 0,
  border: 0
});

Proposed resolution

Add display: block to "hide" properly

CommentFileSizeAuthor
#6 interdiff.txt508 bytesolli
#6 2531636-6.patch479 bytesolli
#2 after.png113.73 KBLucasljj
#2 before.png116.54 KBLucasljj
issue.patch479 bytesLucasljj

Comments

Lucasljj’s picture

Issue summary: View changes

added link

Lucasljj’s picture

StatusFileSize
new116.54 KB
new113.73 KB

added screenshots, tested on Firefox 40 and Chrome 43.0.2357.132 on Ubuntu with same results

Lucasljj’s picture

Issue summary: View changes
Lucasljj’s picture

Issue summary: View changes
droplet’s picture

Status: Needs review » Reviewed & tested by the community
olli’s picture

StatusFileSize
new479 bytes
new508 bytes

Fixed eslint error

core/misc/dialog/dialog.ajax.js
  70:27  error  Unexpected token ;
droplet’s picture

Ouch, Thanks @olli

Lucasljj’s picture

Ops... thanks @olli :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 71c926e on 8.0.x
    Issue #2531636 by Lucasljj, olli: Remove unnecessary extra space in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.