Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358724 - When processing arrows to traverse month, don't close popup when done scrolling
Summary: When processing arrows to traverse month, don't close popup when done scrolling
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Emil Crumhorn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-23 10:08 EDT by Sharon Snyder CLA
Modified: 2021-07-05 11:39 EDT (History)
0 users

See Also:


Attachments
patch for mouse click processing of arrow buttons on month bar (and includes key processing fix from previously submitted patch) (1.96 KB, patch)
2011-09-23 10:11 EDT, Sharon Snyder CLA
wim.jongman: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sharon Snyder CLA 2011-09-23 10:08:11 EDT
Build Identifier: 

I did not find it intuitive that the popup would close when you click on the month arrows.  I have fixed this so that if the arrowThread was running when the mouseUp event is received, we will not close the popup.  This happens if you have a date selected (which was most likely from before you clicked on the arrow).

Reproducible: Always

Steps to Reproduce:
1.drop down the combo to show the calendar
2.click on the arrow key (either direction)
3.upon mouse up, popup closes (if you had a previously selected date)
Comment 1 Sharon Snyder CLA 2011-09-23 10:11:26 EDT
Created attachment 203906 [details]
patch for mouse click processing of arrow buttons on month bar (and includes key processing fix from previously submitted patch)
Comment 2 Sharon Snyder CLA 2011-09-23 10:12:22 EDT
Code to just fix the mouse processing is below.  From CalendarComposite.java:


	public void mouseUp(MouseEvent event) {
		mMouseIsDown = false;
		boolean bArrowThread = (mArrowThread!=null);
		killArrowThread();

		if (mNoDayClicked) {
			mNoDayClicked = false;
			return;
		}

		if (mDateRange) {
			// this may seem odd but it's not. First we set the "up" date to the
			// current date
			// then we overwrite it by setting the selected date to when the
			// mouse click was "down".
			// that way the date set on the combo will be the date the user
			// clicked first, and not the date when the user
			// let go of the mouse button, this will be reflected in the
			// listeners as well
			mMouseUpDay = mSelectedDay;
			mSelectedDay = mMouseDownDay;
		}

		//don't close the popup if they were pressing the arrow!
		if (mSelectedDay != null && !bArrowThread) {
			notifyListeners();
			notifyClose();
		}
	}
Comment 3 Emil Crumhorn CLA 2011-09-24 11:39:17 EDT
Patch applies, thanks!!