? ? Pending

User tests: Successful: Unsuccessful:

avatar Quy
Quy
4 Feb 2020

Pull Request for Issue #27572.

Summary of Changes

Microsoft Edge and Safari don't display custom select correctly when background-color is specified in background shorthand. This PR separates background-color to its own property.

Testing Instructions

Use Safari or Windows Edge.
Log in administration area.

Go to Articles.
Click Filter Options.
Click Select Condition dropdown and select a condition.
Selected item has no down arrow.
Apply PR.
Repeat steps above.
Selected item has down arrow.
Confirm with other browsers such as Firefox, Chrome work correctly as before.

Repeat for RTL.

Expected result

27572-pr

Actual result

27572-before

avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2020
Category Administration Templates (admin)
avatar Quy Quy - open - 4 Feb 2020
avatar Quy Quy - change - 4 Feb 2020
Status New Pending
avatar Quy Quy - change - 4 Feb 2020
The description was changed
avatar Quy Quy - edited - 4 Feb 2020
avatar Quy Quy - change - 4 Feb 2020
Title
[4.0] Fix background shorthand compatibility with some browsers
[4.0] Fix background shorthand compatibility with Safari/Edge
avatar Quy Quy - edited - 4 Feb 2020
avatar brianteeman
brianteeman - comment - 4 Feb 2020

Just for reference bootstrap will not fix this until v5

avatar Quy Quy - change - 4 Feb 2020
Labels Added: ?
avatar Quy Quy - change - 4 Feb 2020
The description was changed
avatar Quy Quy - edited - 4 Feb 2020
avatar Quy Quy - change - 4 Feb 2020
The description was changed
avatar Quy Quy - edited - 4 Feb 2020
avatar Quy Quy - change - 4 Feb 2020
Title
[4.0] Fix background shorthand compatibility with Safari/Edge
[Draft][4.0] Fix background shorthand compatibility with Safari/Edge
avatar Quy Quy - edited - 4 Feb 2020
avatar infograf768
infograf768 - comment - 7 Feb 2020

Tested with Safari (not Catalina) and I have the issue.
The issue is solved by this PR

Before

Screen Shot 2020-02-07 at 12 40 29

After patch

Screen Shot 2020-02-07 at 12 40 56

avatar infograf768
infograf768 - comment - 7 Feb 2020

@Quy
can you correct also
#27798 (comment)

so that we can test OK and merge asap

avatar Quy
Quy - comment - 7 Feb 2020

I can't get it to work for RTL. Will you give it a go?

avatar infograf768
infograf768 - comment - 7 Feb 2020

I can't get it to work for RTL. Will you give it a go?

which page?

avatar Quy
Quy - comment - 7 Feb 2020

The filter section. Switch to RTL and you will see.

avatar infograf768
infograf768 - comment - 7 Feb 2020

IN Safari It works here
Screen Shot 2020-02-07 at 13 06 33

avatar Quy
Quy - comment - 7 Feb 2020

There is no arrow on the left in dropdown ie - Select Stage -.

avatar infograf768
infograf768 - comment - 7 Feb 2020

Screen Shot 2020-02-07 at 13 09 25

avatar Quy
Quy - comment - 7 Feb 2020

By default there should be an arrow. See 20. There is no indicator that it is a dropdown.

avatar Quy
Quy - comment - 7 Feb 2020

arrow

avatar infograf768
infograf768 - comment - 7 Feb 2020

Will look at that. We may have to add a variable.

avatar infograf768
infograf768 - comment - 7 Feb 2020

hmm.
I get the correct svg but it does not work (Safari) for the RTL concerning ordering and list. Works fine in all other browsers here (macintosh)

Screen Shot 2020-02-07 at 15 45 32

here is the .diff which also contains the part you did for searchtools.

diff --git a/administrator/templates/atum/scss/_variables.scss b/administrator/templates/atum/scss/_variables.scss
index 5118244..a48b252 100644
--- a/administrator/templates/atum/scss/_variables.scss
+++ b/administrator/templates/atum/scss/_variables.scss
@@ -214,7 +214,9 @@
 $custom-select-bg-size:              116rem;
 $custom-select-indicator:            url(../images/select-bg.svg);
+$custom-select-indicator-rtl:        url(../images/select-bg-rtl.svg);
 $custom-select-indicator-active:     url(../../../images/select-bg-active.svg);
 $custom-select-indicator-active-rtl: url(../../../images/select-bg-active-rtl.svg);
 $custom-select-background:           $custom-select-indicator no-repeat right center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
+$custom-select-background-rtl:       $custom-select-indicator-rtl no-repeat left center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
 $custom-select-box-shadow:           $atum-box-shadow;
 $custom-select-bg-size-sm:           75rem;
diff --git a/administrator/templates/atum/scss/system/searchtools/searchtools.scss b/administrator/templates/atum/scss/system/searchtools/searchtools.scss
index 917a382..9bd95d7 100644
--- a/administrator/templates/atum/scss/system/searchtools/searchtools.scss
+++ b/administrator/templates/atum/scss/system/searchtools/searchtools.scss
@@ -88,9 +88,11 @@
       &.active {
         color: var(--white);
-        background: $custom-select-bg $custom-select-indicator-active no-repeat right center;
+        background: $custom-select-indicator-active no-repeat right center;
+        background-color: $custom-select-bg;
         background-size: $custom-select-bg-size;
 
         [dir=rtl] & {
-          background: $custom-select-bg $custom-select-indicator-active-rtl no-repeat left center;
+          background: $custom-select-indicator-active-rtl no-repeat left center;
+          background-color: $custom-select-bg;
         }
       }
diff --git a/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss b/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss
index 8fa402b..a0238f5 100644
--- a/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss
+++ b/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss
@@ -3,9 +3,11 @@
 .custom-select {
   max-width: $input-max-width;
+  background: $custom-select-background;
+  background-color: $custom-select-bg;
 
   [dir=rtl] & {
     padding: $custom-select-padding-y $custom-select-padding-x $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding);
-    background-position-x: 0%;
-    background-image: url(../images/select-bg-rtl.svg);
+    background: $custom-select-background-rtl;
+    background-color: $custom-select-bg;
   }

@ciar4n
Is it related to center/116rem ?
Help! ?

avatar ciar4n
ciar4n - comment - 7 Feb 2020

Probably more left center/116rem which is a bit strange. Try instead...

background-position: left center;
background-size: 116rem;
avatar infograf768
infograf768 - comment - 7 Feb 2020

will test tomorrow, but weird as the same code works for ltr

avatar Quy
Quy - comment - 7 Feb 2020

@infograf768 If solved, please submit PR to this branch or submit a new PR and I will close this one. Thanks.

avatar infograf768
infograf768 - comment - 8 Feb 2020

@Quy It does not work, and only in Safari...

@ciar4n
Your proposal does not work. ?

avatar Quy
Quy - comment - 8 Feb 2020

@infograf768 Maybe breakdown background completely to their separate properties.

avatar infograf768
infograf768 - comment - 8 Feb 2020

Maybe breakdown background completely to their separate properties.

That is what I did with @ciar4n suggestion.
It works perfectly in all browsers.
And breaks only for RTL in Safari here.
The code is working as should in LTR, including Safari.

Mystery or Safari bug.
As we need to test anyway and it is better than nothing, will make a new PR with the .diff above.
Will then close this one as you suggested.

avatar infograf768
infograf768 - comment - 9 Feb 2020

Closing in favor of #27864

avatar infograf768 infograf768 - close - 9 Feb 2020
avatar infograf768 infograf768 - change - 9 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-09 09:40:51
Closed_By infograf768
Labels Added: ?

Add a Comment

Login with GitHub to post a comment