Bug 29001 - Search bar undo no longer works.
Summary: Search bar undo no longer works.
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 5.9
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 5.10 (C6)
Assignee: Cody Russell
: 29616 ()
Depends on:
Reported: 2015-04-10 18:39 UTC by kanonball88
Modified: 2016-02-01 22:34 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

A screenshot of the result of clicking the search bar then clicking the main document, and then typing, in 5.9.2 build 0 (60.22 KB, image/png)
2015-05-20 14:28 UTC, kanonball88
Editor logs as per the procedure in issue 29616 (2.88 KB, application/zip)
2015-05-20 14:29 UTC, kanonball88

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description kanonball88 2015-04-10 18:39:04 UTC
Once the search bar is clicked, the Undo (cmd Z) no longer works.
Any text that is typed is now typed into both the search bar, and the active document, except the curly brace {} characters, which end up only in the search bar.  Pressing backspace only sends the backspace into the active document.
Clicking the main document to remove focus from the search bar no longer works, and the above behaviour continues.
Pressing Cmd+Tab to switch applications then switch back will clear the search bar.

The only way to get out of this is to restart Xamarin.
It appears to reproduce consistently on my machine.

Repo steps:

Open a document. A sketch will work fine.
Click the search bar on the top right.
Type anything.
Comment 1 Marius Ungureanu 2015-04-27 08:56:04 UTC
Permanent focus and duplicated text are fixed and will be shipped in 5.9.1. Undo issue still remains. Changing title.
Comment 2 Marius Ungureanu 2015-05-05 05:16:57 UTC
*** Bug 29616 has been marked as a duplicate of this bug. ***
Comment 3 Marius Ungureanu 2015-05-20 07:40:34 UTC
Assigning to cody to work on the NSUndoManager implementation in the GdkQuartzWindow.
Comment 4 kanonball88 2015-05-20 14:18:15 UTC
It is still completely broken in 5.9.2 build 0.  Typing in the search bar results in typing in the main document, and clicking the main document after typing in the search bar still results in typing in the search bar.  Typing in the main document after typing in the search bar and clicking the main document results in text in both places except when {shift} is pressed which results in text only going to the search bar.  And pressing enter in the search bar results in a new line in the main document, and a space in the search bar.    Focus is still stuck.  I see a blinky cursor in both the search bar and the main document.
Comment 5 kanonball88 2015-05-20 14:28:24 UTC
Created attachment 11260 [details]
A screenshot of the result of clicking the search bar then clicking the main document, and then typing, in 5.9.2 build 0
Comment 6 kanonball88 2015-05-20 14:29:59 UTC
Created attachment 11261 [details]
Editor logs as per the procedure in issue 29616
Comment 7 Cody Russell 2015-05-20 17:07:45 UTC
Marius, I don't think this is related to implementing any NSUndoManager stuff in GdkQuartzWindow. If you look at the docs for NSWindowDelegate's windowWillReturnUndoManager it says "If this method is not implemented by the delegate, the window creates an NSUndoManager for window." https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate_Protocol/index.html#//apple_ref/occ/intfm/NSWindowDelegate/windowWillReturnUndoManager:

At one point I added this patch: https://github.com/mono/bockbuild/blob/master/packages/patches/gtk/gtknsview-forward-cmdz-to-textview-undo-manager.patch

(and another one for other Cmd keys)

and this commit:


And that fixed Cmd-[ACXVZ] for embedded inputs, and I never needed to patch GdkQuartzWindow to implement windowWillReturnUndoManager: or anything. But then you and Lluis made some changes to CommandManager and you wanted me to revert my commit. I don't remember specifics of why, but it's in that chat log on March 11.

I'm not sure what needs to be done to fix undo yet, but I feel like messing with GdkQuartzWindow is probably not it.
Comment 8 kanonball88 2015-05-22 13:46:27 UTC
I'm still reproducing permanent focus in the search bar in 5.9.2 (build 2)
Comment 9 kanonball88 2015-06-11 13:51:57 UTC
I'm still reproducing permanent focus in the search bar in 5.9.4.   Since this issue was renamed away from the showstopper bug that actually wasn't fixed, should I make a new issue for it?
Comment 11 Paul Farrow 2015-06-25 10:03:03 UTC
When will this be available? I am still having the issue with this setup

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: 218bfab7-61ea-4907-900e-1fd592877c08
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 6916d0e
Branch: master
Build date: 2015-06-18 17:18:10-0400

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/paulfarrow/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:35:08-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Mac OS X 10.10.3
Darwin Pauls-MacBook-Pro-2.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 12 Cody Russell 2015-06-25 10:56:02 UTC
Hi Paul, I'm not sure exactly when it will be released, but it should go into the next major Mono release I think.
Comment 13 Paul Farrow 2015-06-25 11:10:53 UTC
Thanks Cody.  I will continue to stay on 5.8.3 (build 1).

Comment 14 Moshe Taieb 2016-02-01 22:34:51 UTC
Quick Search (top right) does not work, (could not accept any typing) and return to work only after I close and reopent Xamarin Studio