Bug 162263 - style.removeProperty not working for "overflow: hidden !important"
Summary: style.removeProperty not working for "overflow: hidden !important"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-20 03:24 PDT by Mike Sidorov
Modified: 2018-12-18 17:22 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Sidorov 2016-09-20 03:24:07 PDT
http://jsbin.com/requfofayi/edit?js,console,output

Try to set "overflow: hidden !important" style property and then call style.removeProperty('overflow');
No error if thrown but still everything remains intact.
Comment 1 Alexey Proskuryakov 2016-09-20 09:43:17 PDT
Mike, can you clarify what the expected behavior is for the test case? It seems like displaying red on button click is expected, and what the test actually verifies is getting the following console output after two clicks:

"hidden"
""

Is this accurate?
Comment 2 Mike Sidorov 2016-09-20 09:53:52 PDT
Alexey, sorry, had to explain this earlier.

The test case is: clicking a button toggles to properties - background-color: red and overflow: hidden. These properties are being set/removed on every button click.
With background-color everything is fine - it gets set to red and removed on the next click.
But with overflow there's an issue: once you set it, you cannot remove it at all. I'm getting the following output in the console:

"hidden"
"hidden"

What's expected is to remove that property (to be displayed "hidden" - "").
Comment 3 Simon Fraser (smfr) 2016-09-20 10:45:26 PDT
Seems similar to bug 49059.
Comment 4 Mike Sidorov 2016-12-20 23:32:13 PST
Still actual for Safari 10.
Comment 5 Simon Fraser (smfr) 2016-12-21 08:36:33 PST
Please test in the next Safari Tech Preview (20).
Comment 6 Michał Gołębiowski-Owczarek 2016-12-21 10:58:33 PST
(In reply to comment #5)
> Please test in the next Safari Tech Preview (20).

WebKit Nightly is still affected so I assume next Safari TP won't change anything.
Comment 7 Simon Fraser (smfr) 2018-12-18 17:22:53 PST
I see:

"hidden"
""

so it seems this works now (STP 72).