Last modified: 2014-03-13 23:49:25 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 T63059, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61059 - VisualEditor: Deleting the first digit of the size in Media Settings removes the entire value in the both fields
VisualEditor: Deleting the first digit of the size in Media Settings removes ...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Normal minor
: VE-deploy-2014-03-06
Assigned To: Moriel Schottlender
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-07 22:27 UTC by Rummana Yasmeen
Modified: 2014-03-13 23:49 UTC (History)
6 users (show)

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


Attachments
Screenshot (43.97 KB, image/png)
2014-02-07 22:29 UTC, Rummana Yasmeen
Details

Description Rummana Yasmeen 2014-02-07 22:27:28 UTC
Steps to reproduce:

1.Open the page in VE
2.Insert an image
3.Go to Media Settings>Advanced Settings
4.Now delete the first digit of the size.For example:if you have size :600*450
Just attempt to make it 500*450

Observed Result:
The Width and the Height both values turned into 0.User have to again type the input of Height value which he might not wanted to change.


Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5 
http://en.wikipedia.beta.wmflabs.org/wiki/7thfeb?veaction=edit
Comment 1 Rummana Yasmeen 2014-02-07 22:29:02 UTC
Created attachment 14524 [details]
Screenshot
Comment 2 Moriel Schottlender 2014-02-11 22:10:09 UTC
Cannot replicate in master.

Changing the size in either width or height (by deleting or changing the first digit or typing from scratch) changes the corresponding input.

Example:

- Inserted an image with initial size 182x150
- Media settings -> Advanced settings, deleted '1' to result in width: 82
- Result: Height adjusted to 68 (Expected)
- Marked the first digit in Width (8) and changed to 9
- Result: Height adjusted to 76

This works for me in both Chrome and Firefox.

Am I missing any details to replicate?
Comment 3 James Forrester 2014-02-11 23:50:52 UTC
If the size is "400" and you delete the first character (4), it becomes "00", which instantly becomes "0". Undoing this restores the 4… so it becomes "40" (and there's nothing left on the browser undo stack).

Maybe if you change the value such that it doesn't make sense, rather than cleaning up "00" or "0" and then complaining, we should just blank the field?
Comment 4 Moriel Schottlender 2014-02-12 04:20:59 UTC
The problem is that the size widget constantly adjusts both values numerically, so value "00" in the width is read as the number '0', which actively changes the value in the height input (to 0). 

Now, since a change occurred in height, that triggers an automatic change to width, which brings it down to the number 0.

We can fix this by not triggering the adjustment on keypress but rather when you leave the input (so, onChange event) but that has several other issues it may raise. For instance, what happens if I changed a width without moving away from the input (technically no 'change' input event) and then clicked the "Apply" button? The corresponding dimension didn't get updated, and while the 'change' event will trigger when I click the button (because the input loses focus) it will be too late to notify the user of a changed dimension.

I am not sure how this can be fixed without removing the functionality of updating both dimensions simultaneously. We should discuss this further.
Comment 5 WhatamIdoing 2014-02-19 22:57:29 UTC
What about making any "0" immediately become the wiki's default size?  

Right now, there's no way to remove a size and return to unspecified default (see bug 50379).
Comment 6 Moriel Schottlender 2014-02-19 23:05:26 UTC
I'm working on trying to get default size to work. There are several technical problems I am trying to sort through now, but once those are solved, we'll be able to have more options with default size, like a 'default' button and reverting to default on 0 value.
Comment 7 Gerrit Notification Bot 2014-03-05 03:52:56 UTC
Change 115939 had a related patch set uploaded by Mooeypoo:
[wip] Deal with 'none'/'border' and default size in media edit

https://gerrit.wikimedia.org/r/115939
Comment 8 Gerrit Notification Bot 2014-03-05 19:11:32 UTC
Change 115939 merged by jenkins-bot:
Deal with 'none'/'border' and default size in media edit

https://gerrit.wikimedia.org/r/115939
Comment 9 Rummana Yasmeen 2014-03-07 23:07:47 UTC
Verified the fix in test2 environment.
Comment 10 Rummana Yasmeen 2014-03-13 23:49:25 UTC
Verified the fix in production:https://en.wikipedia.org/w/index.php?title=User:RYasmeen_%28WMF%29/sandbox&veaction=edit

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


Navigation
Links