Bug #7352

Search text box in AtoM clears text when clicking in / out of the text box

Added by Mike Gale over 7 years ago. Updated almost 7 years ago.

Status:VerifiedStart date:10/07/2014
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:UsabilityEstimated time:2.50 hours
Target version:Release 2.2.0
Google Code Legacy ID: Tested version:2.0.0, 2.0.1, 2.1, 2.1.1, 2.2
Sponsored:No Requires documentation:No

Description

To reproduce:

1. Type text in the search text box
2. Click outside the text box briefly
3. The text will clear

Expected behaviour:

The text box shouldn't clear when the user clicks in or out of the search box. When trying to modify a search query or to do something before hitting enter, the clearing of the text is very irritating.

When I commented out the lines:
https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L454
https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L469

It seemed to fix this issue on everything except IE8/9 given my Browserstack tests.

Radda, I'm just assigning you to feedback now because Jesús said you might have tried to address this issue before? If you have any comments about why removing these two lines of code is a bad idea, or have any other suggestions, let me know! Otherwise re-assign the ticket to me and I'll push the fix.


Related issues

Related to Access to Memory (AtoM) - Bug #6111: User can press Tab key 2x to enter search box, but cannot... Verified 12/12/2013
Related to Access to Memory (AtoM) - Bug #5538: User cannot use arrow keys to navigate in Search bar type... Verified 09/05/2013
Duplicates Access to Memory (AtoM) - Bug #6110: Text entered into search box is lost when user moves focu... Duplicate 12/12/2013

History

#1 Updated by Mike Gale over 7 years ago

To clarify, in IE 8 and 9, it seems the place holder text won't automatically clear when clicking in the textbox. While that isn't good (and I'm assuming the clear text code was trying to address this), I feel that most of our users are using IE10+/Firefox/Chrome, and we should cater to them if there isn't an ideal solution.

#2 Updated by Dan Gillean over 7 years ago

  • Status changed from Feedback to Duplicate

See issue #7352 - RADDA, Mike G has an easy fix proposal, but he wanted to check with you to see if there was a reason why we were doing things the way we were doing. Please respond on #7352 when you have a chance.

#3 Updated by José Raddaoui Marín over 7 years ago

  • Status changed from Duplicate to New
  • Assignee changed from José Raddaoui Marín to Mike Gale
  • Requires documentation set to No
  • Tested version 2.0.0, 2.1.1, 2.2 added

I agree with you Mike.

I fixed a client problem in IE8/IE9 where the placeholder string was being searched after clicking a custom search buttom. But this was only happening in that client customization, triggering the blur event in the input before the search when the custom buttom is clicked.

I think we have two options here:

- Remove entirely the placeholder hack for old browsers. You will need to remove/comment a few more lines:

https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L452-L455
https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L459-L462
https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L469
https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L513-L530

- Keep the placeholder hack for old browsers and have the irritating behaviour only in those browsers:

Removing/commenting:

https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L452-L455

And wrapping in a '!Modernizr.input.placeholder' condition:

https://github.com/artefactual/atom/blob/qa/2.2.x/js/dominion.js#L469

I think the second option is better for those who still use those browsers and it'll fix the problem for the others.

#4 Updated by Mike Gale over 7 years ago

  • Status changed from New to QA/Review
  • Assignee changed from Mike Gale to Dan Gillean

Awesome Radda, your second solution worked great. Thanks!

#5 Updated by Dan Gillean over 7 years ago

  • Status changed from QA/Review to Verified

Mike did some testing with legacy browsers in BrowserStack. I have QA'ed this on modern browsers - works on FF 33, Chrome 38, and IE 11, and it works. Happy to see this go into 2.1.1!

#6 Updated by David Juhasz almost 7 years ago

  • Target version changed from Release 2.1.1 to Release 2.2.0

This was fixed in the AtoM 2.2.0 branch, not in 2.1.1 as tagged:
https://github.com/artefactual/atom/commit/9168ab26a017998732505cf341718d2e13481faf

Also available in: Atom PDF