Last modified: 2013-01-22 20:38:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43323, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41323 - [PostEdit] Expand the onclick region of the close button
[PostEdit] Expand the onclick region of the close button
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
PostEdit (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks: 41512
  Show dependency treegraph
 
Reported: 2012-10-23 20:39 UTC by TMg
Modified: 2013-01-22 20:38 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Current onclick region in red, favored in blue (2.23 KB, image/png)
2012-10-23 20:39 UTC, TMg
Details

Description TMg 2012-10-23 20:39:46 UTC
Created attachment 11226 [details]
Current onclick region in red, favored in blue

I'm reposting the comment https://bugzilla.wikimedia.org/show_bug.cgi?id=40307#c8 as a separate bug.

It's nice to have the close button (the little "x") on the popup. This way everybody can see it's possible to make the popup go away without trying to click it.

But: The onclick region is way to small (red rectangle in the attached screenshot). The popup goes away very fast and it's almost impossible to hit the small "x" in that short time. The region should be much, much bigger. At least the blue rectangle. Even with such a big onclick region nothing is obfuscated. Clicking the close button by accident is not possible. It's still possible to select the text (if you are fast enough to do this).
Comment 1 Ori Livneh 2012-10-23 21:04:04 UTC
Good idea; implemented. Gerrit change #29694.
Comment 2 TMg 2012-10-29 19:57:10 UTC
With the following code the "x" is positioned exactly as it is now.

.postedit-close {
  line-height: 2.3em;
  padding: 0 .8em;
  right: 0;
  top: 0;
}

The right position was 0.8em. I moved this to the padding.

The top position was 0.6em. I added this to the line-height (0.6em + 1.1em + 0.6em = 2.3em).

Slightly related: I saw that the resulting HTML code looks like <div class="postedit-icon">this with the text inside the icon container</div>. I don't think this is intended. The CSS contains a "line-height: 25px" for that container which does make for the icon but not for the text. Everything else uses "em". This makes the calculated height of the popup 0.6em (padding) + 25px (line-height for a single line of text) + 0.6em (padding). Because of this mix of "px" and "em" it's not really possible to center the "x".

You should use "em" everywhere except for the (empty) icon container.
Comment 3 Ori Livneh 2013-01-22 02:42:20 UTC
LGTM. Thanks, TMg. 
Patch in Gerrit: https://gerrit.wikimedia.org/r/#/c/45085/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links