﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8148	too large confirmation dialog displayed, and non-validated command before handling a received RemoteControl request (patch proposed)	verdy_p	team	"When receiving a remote control from an external link presented on a web site, that orders JOSM to load a list of objects, the list of objects to load from the DB is formated in the remote command in a ""compact"" format like ""r12345,r56789,w0123"".

However such list can be quite long, and when JOSM displays its confirmation dialog, this long string contains no space and no newlines. So the dialog that appears, and that attempt to display this long list of objects, will frequently be oversized so much that even the OK/Cancel buttons won't even fit on the screen :

The dialog will just align to the right side of the screen, and most of the message will be out of screen, the dialog window exceeding its size. The only way to use the GUI of this dialog, to read the message and press one of the action buttons requires us to drag and move the very large window horizontally.

Additionally, on PCs that may have multiple displays, the parts of the window that exceeds the current display will attempt to appear on other screens placed beside the main screen ; as these screens may have distinct resolutions, and JOSM is unable to adapt the rendering of those parts using the correct resolution (for sizing fonts, or for correctly rendering text with ClearType whilealso matching the effective physical resolution of the display), this causes the FULL Windows desktop to change into a color compatibility mode, and to disable the Aero desktop style (meaning that the support of transparent or half-transparent windows is also disabled), and with a simpler color model (this affects ALL currently running applications, and cannot be stopped until JOSM is quitted completely).


Some desktop window managers (e.g. in Linux) will refuse to position or move the dialog horizontally outside the maximum left margin of the combined display (but still they won't automatically constrain these dialogs to fit completely in the display, by automatically scrollbars around the client area of the dialog window). In that case it will be impossible to even see the full message or to reach the two OK and Cancel buttons that ""appear"" outside of the display, very far away to the right.
 
For this reason, you SHOULD not size this dialog automatically by assuming that the text will fit on the screen (it does not when you just include blindly the remote control parameter string, without any reformating).

Instead, :

 * you should first reformat this list of objects to display in the remote control conformation dialog by substituting the regexp /, */ by "", "", so that linebreaks will be possible.

 * you should allow a vertical scrollbar to appear automatically in the text area showing the formatted message in the dialog above the two action buttons, instead of just using a static text area just constained on the extent of the client area of the dialog window : if this message cannot fit in a reasonable sized dialog that can be fully displayed on the desktop screen, the message will still be fully readable by just scrolling it vertically (either wit hthe scrollbar, or by moving a focus caret (or selection) in the text using the keyboard or mouse within the text area.

 * Note that the text area showing any message with some variable/substituted/inserted parts in any confirmation dialog (or any other error, exception, or progress/status/information dialogs) SHOULD ALWAYS be focusable with keyboard or mouse, in order to allow copies into the clipboard, even if it is not editable and the only action possible is to click a OK and/or Cancel button (or pressing Enter or Escape keys), even if this message is short enough to be fully visible without scrolling it.
"	defect	closed	normal		Core		fixed	GUI RemoteControlHandler	
